1

クライアント証明書を要求するように IIS サーバーをセットアップしました。ただし、ブラウザーはユーザーに尋ねることはありません。IE が「いいえの場合にクライアント証明書の選択を要求しない」を有効にしている場合でも、クライアント証明書情報を直接送信します。

私のコードまたは 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");
    }

}
4

0 に答える 0