Happy stress free coding

May 30, 2009

Praise to process monitor

Process monitor can be found here: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

I had an IIS issue like so many times before. IIS just said stuff like "CS0016 directory name is invalid" on perfectly legitimate directories.

This of course has to do with access rights – IIS needs access to the directory it is writing to (the one called ASP.NET temporary files).

It also needs access to where it reads the files (under c:\inetpub).

AND the temp directory also, the one identified by the variable %temp%...

Having set all these to FULL for the account running my AppPool I still got the error. Needless to say I felt frustrated.

But then I started up Process Monitor, filtered away all activity but "File system activity", Filtered away all processes but W3Wp.exe and csc.exe. Then I tried to reach the page once more and checked the logs and saw where it failed with a "ACCESS DENIED" result.

So I clicked up the failing row in process explorer and saw that csc.exe was not allowed to write files to here: C:\Windows\System32\config\systemprofile\AppData\Local\Temp

But why had I not checked that before? Well my not so fast brain did not think of the fact that %temp% is different for the account running IIS than what it is for me, the logged in user. So I had set the access rights on MY %temp% folder and NOT for the folder used by IIS. Easy peasy – thank you process explorer. I sure hope I remember to check my blog for hints next time I get these issues.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home