Re: How to get the username from the Certificate
From: Michel Gallant (neutron_at_istar.ca)
Date: 07/04/03
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: How to get the username from the Certificate"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: How to get the username from the Certificate"
- Next in thread: Michel Gallant: "Re: How to get the username from the Certificate"
- Reply: Michel Gallant: "Re: How to get the username from the Certificate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 4 Jul 2003 15:15:41 -0400
>From asp.net you can use HttpClientCertificate.Subject :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebhttpclientcertificatememberstopic.asp?
- Mitch
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote in message
news:ueaVCflQDHA.1040@TK2MSFTNGP12.phx.gbl...
> You should be able to get info about the client certificate from the
> HttpRequest.ClientCertificate property. I would suspect that the name
> associated with the cert would be the same as the username in context
> (although one might be a DN instead of the samAccountName in the context),
> but hopefully that will get you what you want.
>
> I've never tested this, but I assume that's the way it is supposed to work.
>
> Joe K.
>
> "Phanidhar" <phanidhar@ctd.hcltech.com> wrote in message
> news:07ff01c341fa$30ef3b80$a301280a@phx.gbl...
> > Many thanks for ur reply.
> > I want the user name to be retrieved from the certificate.
> > I need this username to use else where. so i need a way to
> > get the info.
> > The authentication part will be done by the IIS as u have
> > mentioned.
> > How can i get the name of the user from the digital
> > certificate he provides.
> > Thnaking you in advance.
> > Regards
> > Phanidhar
> > >-----Original Message-----
> > >My understanding of this is that if you set up
> > certificate authentication in
> > >IIS (under the security tab) and get the certificate
> > mappings correct to
> > >point to domain accounts, then IIS will create a login
> > token for the user
> > >and the user information will be provided to you directly
> > in the
> > >HttpContext.User property (assuming you are using Windows
> > authentication in
> > >ASP.NET), so you won't have to do any of this
> > programmatically.
> > >
> > >However, I don't have an installation available where I
> > can test this right
> > >now, so I don't have an easy way to confirm this. Still,
> > it seems like it
> > >would be best to let IIS and the runtime do this for you.
> > >
> > >Joe K.
> > >
> > >"Phanidhar" <phanidhar@ctd.hcltech.com> wrote in message
> > >news:028601c34074$01979080$a001280a@phx.gbl...
> > >> Hi,
> > >> I'm using Win2K advanced server which acts as a domain
> > >> controller and has a Enterprise certificate Authority
> > >> installed on it. I deployed a web application on my
> > >> server and was able to waork successfully with http
> > >> access.
> > >> Now i want to move to https with authenticated
> > access
> > >> and want the user name to be taken from the digital
> > >> certificate he provides to access the site. How can i do
> > >> this in ASP.NET?? what are the APIs i need to call to
> > get
> > >> the user name from the certificate he provides and
> > >> validate this certificate against the certificate in the
> > >> Active Directory? How do i get the access to the
> > >> certificate user provides from the ASP.NET application?
> > >> Plese let me know how i can achive this.
> > >> Thanking you in advance.
> > >> Regards
> > >> Phanidhar
> > >
> > >
> > >.
> > >
>
>
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: How to get the username from the Certificate"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: How to get the username from the Certificate"
- Next in thread: Michel Gallant: "Re: How to get the username from the Certificate"
- Reply: Michel Gallant: "Re: How to get the username from the Certificate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|