Wednesday, August 17, 2005

Allowing anonymous access to an IIS virtual directory through code (programmatically)

var entry = new System.DirectoryServices.DirectoryEntry(@"IIS:\\127.0.0.1\W3SVC\1\Root\" + VirtualDirectoryName);
entry.Properties["AuthAnonymous"][0] = true;
entry.CommitChanges();

No comments:

Post a Comment