"Check for Updates" fails with write/file create permission denied in temp directory
GreinerKevin
Posts: 4 New member
in SQL Prompt
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
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)
Tagged:
Best Answer
-
chrisqtran Posts: 121 Silver 3Thanks 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
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
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.
Any other ideas?