Click here to Skip to main content
15,946,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am validating the certificate string given by SAML Provider based on the certificate string content. I want to fetch certificate string from certificate store for X509Certificate.

What I have tried:

Code is as below:
  string samlCertificate = @"-----BEGIN CERTIFICATE-----

                // 2. Let's read the data - SAML providers usually POST it into the "SAMLResponse" var
                var samlResponse = new Response(samlCertificate, Request.Form["SAMLResponse"]);

                if (samlResponse.IsValid())
                    string username, email, firstname, lastname;

                    username = samlResponse.GetNameID();
                    email = samlResponse.GetEmail();
                    firstname = samlResponse.GetFirstName();
                    lastname = samlResponse.GetLastName();

OriginalGriff 11-Aug-22 14:09pm    
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900