1

I create multiple site in IIS. These IIS sites has same physical path. Because they have same source code some times i need to distinguish between them. I use this solution :

I use separate certificate for each site and i want to get certificate in controller. for this purpose i use this code:

if (Request.ClientCertificate.IsPresent)
        {cert = new X509Certificate2(this.Request.ClientCertificate.Certificate);}

but Request.ClientCertificate.IsPresent Has false value. I should mentioned that i create certificate with makecert.exe and install it on root certificate path. the certificate also presents in browser. finally i need the running site certificate. I don't know how can i get that certificate?

Please give me your insights.

5
  • What version of IIS are you using? May 14, 2016 at 7:08
  • I use IIS 7 on Windows 7 May 15, 2016 at 7:12
  • Please help me. I need your answer May 16, 2016 at 5:14
  • Am I the First One in the world face to this Problem!!!!!!!!!!!????? Or This is one of the insolvable problem in the word????????????!!!!!!!! May 18, 2016 at 8:04
  • finally i need the running site certificate. You mean that you need to get the client certificate in the code, right? I am trying to do the same, and I too get the .IsPresent being false. Did you ever figure this out? Jun 24, 2020 at 12:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.