Problem setting authentication modes on files under a virtual directory

From: Joel Zhou (joel.zhou@emersonprocess.com)
Date: 10/28/02


From: "Joel Zhou" <joel.zhou@emersonprocess.com>
Date: Mon, 28 Oct 2002 11:36:39 -0800


Our web project needs to set all .aspx pages to use Basic
authentication, and all .asmx pages to use Windows
authentication (NTLM).

When I try to use DirectoryEntry in
System.DirectoryServices, I was not able to change the
authentication mode of a file at the root level of a
virtual directory. However, I was able to change the
authentication mode of a file that is under a web
directory in a virtual directory.

For example, doing the following will throw an
COMException : "System cannot find the path specified".
String iisPath
= "IIS://localhost/W3SVC/1/Root/Email/Service1.asmx");
DirectoryEntry webService = new DirectoryEntry( iisPath ) ;
webService.Properties["AuthNTLM"][0] = true;

If I create a web directory under Email virtual directory,
and open a web service file there, I was then able to set
the authentication.
String iisPath
= "IIS://localhost/W3SVC/1/Root/Email/NewDir/Service1.asmx"
);
DirectoryEntry webService = new DirectoryEntry( iisPath ) ;
webService.Properties["AuthNTLM"][0] = true;

Any suggestions?

Thanks,
Joel



Relevant Pages

  • Re: ADAM proxy authentication + Old password still working after resetPassword
    ... > maintained at AD and it acts as the authentication source. ... > entry = new DirectoryEntry(userDN, userLoginName, password, ... > public bool ResetPassword(string username, string password) ...
    (microsoft.public.windows.server.active_directory)
  • Re: LDAP - Error Obtaining Group Names
    ... "Joe Kaplan" wrote: ... DirectoryEntry to use as your SearchRoot for the DirectorySearcher, ... for the DirectoryEntry for the authenticate function in the GetGroups ... which is all an authentication function should do. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: LDAP - Error Obtaining Group Names
    ... DirectoryEntry to use as your SearchRoot for the DirectorySearcher, ... for the DirectoryEntry for the authenticate function in the GetGroups ... which is all an authentication function should do. ... Error obtaining group names. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Random logon failure with ADAM Bind Proxy
    ... There was a similar problem discussed here a while ago, see "ADAM user ... I have been using ADAM bind proxy to authenticate users against AD. ... a.ADAM bindproxy authentication was working fine. ... DirectoryEntry user = new DirectoryEntry(userDN, ...
    (microsoft.public.windows.server.active_directory)
  • Re: Authenticate Against localhost and AD
    ... >> user names and passwords via a DirectoryEntry bind, ... credentials to ensure that they are not sent in clear text on the network. ... >> For authenticating against local machine accounts, ... but it can definitely be used as an authentication mechanism. ...
    (microsoft.public.dotnet.security)