May be the user who is running IIS is not enough privileges.
http://www.alvas.net - Audio tools for C# and VB.Net developers
"Kevin Wincott" <(E-Mail Removed)> ???????/???????? ? ????????
?????????: news:fhkfbd$2c1k$(E-Mail Removed)...
> Hi
>
> I have created a script that creates a website in IIS6 and sets it up OK
> but the code im using to enable the "anonymous access" doesnt seem to
> work, when I complile it there are no errors, the code is:
>
> w3svc.Properties["AuthFlags"].Value = 1;
> w3svc.Properties["AnonymousUserName"].Value = "username";
> w3svc.Properties["AnonymousUserPass"].Value = "password";
>
> does this look correct? im using IIS 6 and Visual C# 2005
>
> Thank you in advance