Question

I'm using Microsoft.Web.Administration DLL to work with IIS programatically in my ASP.NET application. I'm running Windows 7 with IIS 7.5. What the heck does it take to get this working; the web.adminstration.dll only needs read access for God's sake, doesn't even have to write. I have the same issue on a Windows 2008 R2 box running IIS 7.

I have tried everything to get this working but failed. I tried using the default application pool for the app pool with full rights on the redirection.config given to IIS/DefaultAppPool. I tried using LocalSystem account for the app pool. I tried using NetworkService for the app pool and gave full permissions on the redirection.config file to NetworkService. I tried my own Admin account for the app pool with full permissions on redirection.config file.

I have IUSR and lIS_IUSRS, both with full permissions on redirection.config. I tried adding EVERYONE with full permissions on redirection.config. My UAC is OFF.

How do I find out what account or process is actually trying to read that file and how do I eliminate this issue?

Was it helpful?

Solution

You have to give network services Network Service Read & Execute permission on c:\windows\system32\inetsrv\config to overcome the exception. See Using microsoft.web.administration to query iis7 as non-admin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top