Guest DJ-Jeff Posted September 11, 2007 Posted September 11, 2007 Ok, I am running an asp.net web application on three different sets of servers. The w3wp worker process runs under the 'Network Service' user on all three sets of servers. However, the TMP and TEMP environment variables are set to different values for the ww3wp process on each server set. I am checking the environment variable values using the Process Explorer tool from SysInternals. The values are as follows: - Server set #1: TMP and TEMP are set to "D:\TEMP" - Server set #2: TMP and TEMP are set to "C:\WINDOWS\TEMP" - Server set #3: This is a special case and is the cause of the problems. If I power cycle the server(s), and let the worker process start on its own, TMP and TEMP are set to "C:\DOCUME~1\NETWOR~1\LOCALS~1\Temp". However, if I recycle the app pool or issue an iisreset, the w3wp process comes back up with the TMP and TEMP variables set to "C:\DOCUME~1\LOCALS~1\LOCALS~1\Temp". When server set #3 starts using the "C:\DOCUME~1\LOCALS~1\LOCALS~1\Temp" value for the variables, the web application starts issuing 'Access Denied' errors because the application does not have write access into the Temp directory, which is understandable. We have this temporarily fixed by allowing 'Network Service' full access to the Local Service temp space, but that is not a solution. Does anyone know what would cause the scenario on server set #3??? Because set #1 has a value of "D:\Temp" in use, it leads me to believe that these servers got set up incorrectly. But I don't know enough about all this to know what is incorrect about it. Thanks for taking a look. Jeff
Guest Pegasus \(MVP\) Posted September 11, 2007 Posted September 11, 2007 Re: What determines the environment variables used by a process??? "DJ-Jeff" <DJ-Jeff@discussions.microsoft.com> wrote in message news:C769A255-EBE4-4282-AD08-6C0AEA9CF68C@microsoft.com... > Ok, I am running an asp.net web application on three different sets of > servers. > > The w3wp worker process runs under the 'Network Service' user on all three > sets of servers. > > However, the TMP and TEMP environment variables are set to different > values > for the ww3wp process on each server set. I am checking the environment > variable values using the Process Explorer tool from SysInternals. The > values are as follows: > - Server set #1: TMP and TEMP are set to "D:\TEMP" > - Server set #2: TMP and TEMP are set to "C:\WINDOWS\TEMP" > > - Server set #3: This is a special case and is the cause of the > problems. If I power cycle the server(s), and let the worker process > start > on its own, TMP and TEMP are set to "C:\DOCUME~1\NETWOR~1\LOCALS~1\Temp". > However, if I recycle the app pool or issue an iisreset, the w3wp process > comes back up with the TMP and TEMP variables set to > "C:\DOCUME~1\LOCALS~1\LOCALS~1\Temp". > > When server set #3 starts using the "C:\DOCUME~1\LOCALS~1\LOCALS~1\Temp" > value for the variables, the web application starts issuing 'Access > Denied' > errors because the application does not have write access into the Temp > directory, which is understandable. > > We have this temporarily fixed by allowing 'Network Service' full access > to > the Local Service temp space, but that is not a solution. > > Does anyone know what would cause the scenario on server set #3??? > Because > set #1 has a value of "D:\Temp" in use, it leads me to believe that these > servers got set up incorrectly. But I don't know enough about all this to > know what is incorrect about it. > > Thanks for taking a look. > Jeff Here are the default values for %temp%: - User: c:\Documents and Settings\<UserName>\..\..\temp - System: c:\Windows\temp Note this: - Anyone can change these variables. - Programs can change them too. - The User variable takes precedence over the System variable in a Command Prompt, and perhaps elsewhere too. - AFAIR, applications can issue specific system calls for either the User variable or the System variable.
Recommended Posts