Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Programmatically Asking for Client Certificate (http://www.velocityreviews.com/forums/t782679-programmatically-asking-for-client-certificate.html)

Someone Beneath the Blue Sky 02-12-2004 07:08 AM

Programmatically Asking for Client Certificate
 
Hello All,

I have written a web service. I've added the following code to the
global.asax.cs

protected void Application_BeginRequest(Object sender, EventArgs e)
{
if ( !Request.IsSecureConnection )
{
Response.Redirect(
Request.Url.ToString().Replace( "http:", "https:" ) );
return;
}
}

It forces the clients to connect to my web service only through SSL.

Now I want to force them to supply a client certificate with their
https request (the corresponding flag on IIS is set to not to require
client certificate). How can I do that through dotnet (for example
changing some flag in Requesnt object) ? I know how we can do this
when using wininet, but don't know how to do that in dotnet.

Also I want to set the Common Name of the client certificate in the
server response, so that in case of multiple client certificates if
doesn't ask the client to choose which certificate to use. Is there
any way to do this ?

Any help would be appreciated.


All times are GMT. The time now is 08:42 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.