February 21st, 2011, 06:26 AM
ALTER ASSEMBLY - Access is Denied when installing from users temp folder
I have an installation program that extracts files and places them into a temporary folder (the folder returned by a call to System.IO.Path.GetTempPath();
The installation program prompts the user for some details to the SQL Server to install the assembly to (one of the files extracted to the temporary folder specified above) and then installs the assembly using the details provided (SQL Server Name, Database Name, User Name, Password and whether or not to use integrated security). NOTE: It is assumed that this installation program is being run directly on the SQL server so that there are no issues in locating the phsyical assembly).
I've tested the above process on a few different operating systems and found that it works without errors on most of them except that there are now two Windows XP machines that are failing (a 32-bit and 64-bit version). It seems to be something to do with the authentication provided to SQL server for the installation (it's said to fail when using the SA account however when they use Windows Authentication then it works...so perhaps the SA account doesn't have access to the temp folder used by the currently logged in Windows user?).
Basically the steps are as follows:
* Run installation application
* Installation application extracts required files to the temporary folder returned by System.IO.Path.GetTempPath();
* Installation application invokes a new configuration executable that was extracted to the temp folder
* Configuration executable prompts user for SQL server details
* Configuration application executes SQL to install the assembly (CREATE or ALTER depending on whether or not the assembly exists within the specified SQL server database) using the temp path.
My question is this: Is there a temp folder that I can use that is accessible by the SQL server service/process...something that is global to any process/user/application running on the machine rather than one that's restricted (in some instances) to the currently logged in user?
Tags for this Thread
Click Here to Expand Forum to Full Width