"Check for Updates" fails with write/file create permission denied in temp directory

Using Windows 10, SQL Prompt 10.13.10.1356

When I manually check for SQL Prompt updates from the Help menu, I see a toast message "Error: Cannot check for updates."

The log file shows the following exception. I checked the path C:\Users\kgreiner\AppData\Local\Temp\Red Gate\CFU and it's empty. I deleted C:\Users\kgreiner\AppData\Local\Temp\Red Gate and it was recreated but the same exception occurs.

How can I update SQL Prompt without uninstalling and reinstalling?

System.UnauthorizedAccessException: Write / file create permission denied in temp directory C:\Users\kgreiner\AppData\Local\Temp\Red Gate\CFU

Server stack trace: 
   at RedGate.Update.Client.Download.TempPath.MakeDirectoryUsable(String directory)
   at RedGate.Update.Client.Download.TempPath.GetTempPath()
   at RedGate.Update.Client.Download.DownloadManager.DeleteOldFiles()
   at RedGate.Update.Client.Download.DownloadManager.Download(IEnumerable`1 requestedDownloads, DownloadProgress progress)
   at RedGate.Update.Client.UpdateService.CheckForUpdatesStatic(IUpdateServer updateServer, IDownloadManager downloadManager, String serialNumber, Boolean automatic, DownloadProgress progress)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at RedGate.Update.Client.UpdateService.Callback.EndInvoke(IAsyncResult result)
   at RedGate.Update.Client.UpdateService.EndCheckForUpdates(IAsyncResult asyncResult)
   at RedGate.Update.Client.UpdateFacade.CheckFinished(IAsyncResult ar)

Best Answer

  • chrisqtranchrisqtran Posts: 121 Silver 3
    Thanks for the update, Kevin.

    Could you please try and run SQL Prompt as an administrator and then try and see if it checks for updates? Could you also try adding the 'Everyone' permission to the folder mentioned in the error and give it full read/write/execute access?

Answers

  • Hi Kevin,

    The "Check for Updates" feature doesn't update our products automatically. It just notifies the user that there is a newer version available. At this time, there's no way to update our products without uninstalling and reinstalling.

    As to why you're seeing "Error: Cannot check for updates.", it's possible that your network security is blocking our endpoints. I'd send this article to them and make sure nothing is being blocked. https://productsupport.red-gate.com/hc/en-us/articles/360002374673-Licensing-update-URLs-to-add-to-your-AllowList-in-firewall
  • "Check for Updates" works for my coworkers who are using the same VPN. So I don't think it's a network problem.

    If I'm reading the call stack correctly, the exception is coming from a method named MakeDirectoryUsable(). That doesn't look like a method that would make a network call.

    Here is what I've tried:
    1. I have verified that my user account has read/write access to the directory show in the error message.
    2. I deleted C:\Users\kgreiner\AppData\Local\Temp\Red Gate\ and confirmed that this path was recreated the next time I manually checked for an update.

    Any other ideas?

  • Adding Everyone with read/write worked. Thanks for your help.
Sign In or Register to comment.