I'm working with a WIndows XP SP2 image that was provided to me by a customer and I am trying to debug a problem with an asp.net 1.1 application that we are installing on the image. I have been reading a lot of posts related to this subject all over the web, and I have narrowed the problem down to the fact that ASP.NET is trying to use the Administrator's temp directory instead of the %systemroot%\temp directory for the intermediate compilation files before it copies them to its assigned temp directory.
Normally this error message would be caused by an invalid TEMP directory (as specified by the system TEMP variable) or missing permissions on the TEMP folder for ASP.NET or NetworkService. As i understand how ASP.NET compilation is supposed to work it uses the TEMP env var to build the binaries as it compiles and then copies the final file to its configured temp directory to run from.
I checked that my system TEMP variable is set to %SYSTEMROOT%\temp and so is TMP. And I checked the permissions on this folder and added full control for NetworkService and ASP.NET, but it had no effect. Changing the Admin's TEMP variable to another value wouldn't stick and kept getting reset on each reboot. That doesn't seem like a valid solution anyway.
I tried changing the ASP.NET temp directory by modifying machine.config to set tempDirectory="c:\windows\
temp" on the compilation tag, but that just changes the compilation target from c:\windows\microsoft.net\f
ramework\v
1.1.4322\T
emporary ASP.NET Files to c:\windows\temp. It still uses another TEMP directory to build the dll before it copies to the tempDirectory it runs it from. Somehow its getting the Administrator's personal TEMP variable instead of the system variable. I am running as Administrator for testing purposes
I found the only way I could make this go away was to add full control permissions for ASP.NET on c:\documents and settings\administrator\Loc
al Settings\Temp. I just don't think this will be an accepted solution for my customer since they are very security-minded and will not want to create privileges in inappropriate places. How can I make ASP.NET use the system temp folder again instead of the user's temp folder?
Start Free Trial