Problem setting authentication modes on files under a virtual directory
From: Joel Zhou (joel.zhou@emersonprocess.com)
Date: 10/28/02
- Next message: Dave Bost: "Dumb Question"
- Previous message: Joseph Geretz: "Re: How do I give ASP.NET process network credentials?"
- Next in thread: Mike Moore [MS]: "RE: Problem setting authentication modes on files under a virtual directory"
- Reply: Mike Moore [MS]: "RE: Problem setting authentication modes on files under a virtual directory"
- Reply: Ram Parab[MS]: "RE: Problem setting authentication modes on files under a virtual directory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Dave Bost: "Dumb Question"
- Previous message: Joseph Geretz: "Re: How do I give ASP.NET process network credentials?"
- Next in thread: Mike Moore [MS]: "RE: Problem setting authentication modes on files under a virtual directory"
- Reply: Mike Moore [MS]: "RE: Problem setting authentication modes on files under a virtual directory"
- Reply: Ram Parab[MS]: "RE: Problem setting authentication modes on files under a virtual directory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|