I posted here, but don't know if the issue is related to IIS7 or my code.
I have created a IIS7 SOAP Web application which does not read the correct values from the registry. I read the registry using following code:
key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\path\\to\\key");
string tempPath = (string)key.GetValue("tempPath");
The path is used to read the output from a PDF printer.
The application is configured with impersonate as a specific user with local administrator rights, e.g. domain_user1.
When I call the service from my client PC, the service want to use the system temp folder: C:\Windows\temp, instead of the value from registry (D:\temp)
if I log in with domain_user1 to the system using remote desktop, then it does give the correct value.
For my web application I have also
- enabled anonymous access using IUSR.
- set Domain_user1 in connec to.
- created a new application pool with Domain_user1 as identity.
- with with load user folder for the application pool.
It looks like it is reading %temp% from somewhere.
The reason I changed the path away from the standard temp folder is that the service and/or the printer have issues with accessing it, even if "everyone" has full permission.
Could not find any solution on Google, most of what i found told that adding a impersonate will be the solution.
Any one who ever had this issue?