Click here to Skip to main content
15,896,915 members
Home / Discussions / C#
   

C#

 
QuestionGeneric event triggering Pin
skbrann16-Sep-09 22:51
skbrann16-Sep-09 22:51 
AnswerRe: Generic event triggering Pin
N a v a n e e t h17-Sep-09 3:00
N a v a n e e t h17-Sep-09 3:00 
GeneralRe: Generic event triggering Pin
skbrann20-Sep-09 21:49
skbrann20-Sep-09 21:49 
QuestionDll info Pin
mikla52116-Sep-09 22:30
mikla52116-Sep-09 22:30 
AnswerRe: Dll info Pin
Luc Pattyn17-Sep-09 2:46
sitebuilderLuc Pattyn17-Sep-09 2:46 
QuestionValidate java SAML signature from C# Pin
adrya16-Sep-09 21:57
adrya16-Sep-09 21:57 
AnswerRe: Validate java SAML signature from C# Pin
Mirko198016-Sep-09 23:02
Mirko198016-Sep-09 23:02 
GeneralRe: Validate java SAML signature from C# Pin
adrya16-Sep-09 23:25
adrya16-Sep-09 23:25 
I know to parse SAML, i need to validate the signature.
I tried this:

public bool VerifySignature()
       {
           X509Certificate2 certificate = null;

           XmlDocument doc = new XmlDocument();
           XmlElement xmlAssertionElement = this.GetXml(doc);
           doc.AppendChild(xmlAssertionElement);

           // Create a new SignedXml object and pass it
           // the XML document class.
           SamlSignedXml signedXml = new SamlSignedXml(xmlAssertionElement);

           // Get signature
           XmlElement xmlSignature = this.Signature;
           if (xmlSignature == null)
           {
               return false;
           }

           // Load the signature node.
           signedXml.LoadXml(xmlSignature);

           // Get the certificate used to sign the assertion if information about this
           // certificate is available in the signature of the assertion.
           foreach (KeyInfoClause clause in signedXml.KeyInfo)
           {
               if (clause is KeyInfoX509Data)
               {
                   if (((KeyInfoX509Data)clause).Certificates.Count > 0)
                   {
                       certificate = (X509Certificate2)((KeyInfoX509Data)clause).Certificates[0];
                   }

               }
           }

           if (certificate == null)
           {
               return false;
           }

           return signedXml.CheckSignature(certificate, true);

       }


It valides the signature of a SAML signed in .Net but not of this Java one.
GeneralRe: Validate java SAML signature from C# Pin
adrya23-Sep-09 19:03
adrya23-Sep-09 19:03 
QuestionHow can I get the local machine's IP address in a Windows app ? Pin
Rahad Rahman16-Sep-09 21:23
professionalRahad Rahman16-Sep-09 21:23 
AnswerRe: How can I get the local machine's IP address in a Windows app ? Pin
stancrm16-Sep-09 21:26
stancrm16-Sep-09 21:26 
GeneralRe: How can I get the local machine's IP address in a Windows app ? Pin
Calla16-Sep-09 21:36
Calla16-Sep-09 21:36 
AnswerRe: How can I get the local machine's IP address in a Windows app ? Pin
Harvey Saayman16-Sep-09 22:03
Harvey Saayman16-Sep-09 22:03 
AnswerRe: How can I get the local machine's IP address in a Windows app ? Pin
Luc Pattyn17-Sep-09 2:49
sitebuilderLuc Pattyn17-Sep-09 2:49 
AnswerRe: How can I get the local machine's IP address in a Windows app ? Pin
carlecomm22-Sep-09 2:02
carlecomm22-Sep-09 2:02 
QuestionTCP Servers Pin
Harvey Saayman16-Sep-09 21:18
Harvey Saayman16-Sep-09 21:18 
AnswerRe: TCP Servers Pin
N a v a n e e t h16-Sep-09 22:13
N a v a n e e t h16-Sep-09 22:13 
GeneralRe: TCP Servers Pin
Harvey Saayman17-Sep-09 0:51
Harvey Saayman17-Sep-09 0:51 
Questionmodify a css property in code behind Pin
firefeet16-Sep-09 20:50
firefeet16-Sep-09 20:50 
AnswerRe: modify a css property in code behind Pin
firefeet16-Sep-09 23:03
firefeet16-Sep-09 23:03 
AnswerRe: modify a css property in code behind Pin
carlecomm22-Sep-09 2:00
carlecomm22-Sep-09 2:00 
QuestionHelp regarding dynamic 2D array ? Pin
Saad Shuja16-Sep-09 20:26
Saad Shuja16-Sep-09 20:26 
AnswerRe: Help regarding dynamic 2D array ? Pin
OriginalGriff16-Sep-09 21:35
mveOriginalGriff16-Sep-09 21:35 
QuestionQuery regarding Domain knowledge related Url Pin
Tridip Bhattacharjee16-Sep-09 20:08
professionalTridip Bhattacharjee16-Sep-09 20:08 
QuestionGlobal.asax file with Window Applications Pin
Inderjeet Kaur16-Sep-09 19:40
Inderjeet Kaur16-Sep-09 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.