1

I have setup an IIS server to require client certificate. But browser never asks user, it sends directly client certificate info even if IE has enabled "Don't prompt for client certificate selection when no ..."

Is there something to do in my code or IIS ?

public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

        Welcome.Text = "Hello, " + Context.User.Identity.Name;

        string userName;
        userName = User.Identity.Name;

        HttpClientCertificate cert = Request.ClientCertificate;
        if (cert.IsPresent)
            certDataLabel.Text = cert.Issuer;
        else
            certDataLabel.Text = "No certificate was found.";
    }

    protected void Signout_Click(object sender, EventArgs e)
    {
        FormsAuthentication.SignOut();
        Response.Redirect("Logon.aspx");
    }

}
user310291
  • 36,946
  • 82
  • 271
  • 487
  • Does this answer your question? [Browser is not prompting for a client certificate](https://stackoverflow.com/questions/15014288/browser-is-not-prompting-for-a-client-certificate) – KyleMit Jan 15 '20 at 18:13

0 Answers0