Question: I have a web setup project.
It installs the webapp and puts it into the appropriate virtual directory.
So far so good.
My question now is: how do I set folder write permission?
My problem is, I can set the permissions programmatically, but I need to know the IIS user the application runs under, since it's that user that need the permissions.
How can I get (or set) the IIS user ?
views:
30answers:
1
A:
The default value is usually IUSR_%machinename%
You could attempt to read the IIS metabase file but it's usually in a system folder (C:\WINDOWS\system32\inetsrv\metabase.xml). Find the <IIsWebService>
element with the proper Location
attribute and then read the value of the AnonymousUserName
attribute. I don't recommend writing directly to the metabase.
I am only familiar with IIS6 so the above may vary by version.
Hugh Jeffner
2010-07-13 15:26:33
Yes, and I use IIS7 and there is no attribute AnonymousUserName in there...
Quandary
2010-07-15 10:21:28