Greetings,
I am trying to create a Virtual Directory on IIS 6.0 using the .Net
framework.
The problem is that I am always getting "Access is Denied" when I am
trying to commit the changes.
Can anyone help me in explaining what permissions are required to commit
changes to ADSI? and how can I configure them?
Pasting the code and the reference article for your reference.
Reference Article : http://www.15seconds.com/issue/010710.htm
Sample Code :
------------------------------------------
DirectoryEntry dirEntry = new
DirectoryEntry(@"IIS:\\localhost\W3SVC\1\Root");
DirectoryEntries rootEntries = dirEntry.Children;
DirectoryEntry newVirtualDir = rootEntries.Add(ApplicationName,
dirEntry.SchemaClassName);
newVirtualDir.CommitChanges(); // This is the line that throws the error
access deined.
Looking forward to hear from you.
Regards,
Jinesh Udani