SAML assertion serialization does not work
I am trying to write a SAML assertion into an xml document.
To do that I use the WriteXml of the SamlAssertion class
I use the following code:
SamlAssertion
samlAssertion =newSamlAssertion();...
// Create the actual claims and attributes inside the SAML assertion
GenerateSamlStatements(samlAssertion.Statements, proofKeyIdentifier, rst);
SamlSerializer BizSamlSerializer =newSamlSerializer();
WSSecurityTokenSerializer BizSecurityTokenSerialser =newWSSecurityTokenSerializer();
FileStream fs1;
using(fs1 =File.Create("tst3.xml")) {
samlAssertion.WriteXml(XmlDictionaryWriter.CreateTextWriter(fs1,Encoding.UTF8),
BizSamlSerializer,
BizSecurityTokenSerialser);
fs1.Flush();
}
In the file I see only PART of the token. Not all the xml is written. The keys are written and then after some attributes it just stops !
Why ?
Thanks
Manu cohen-yashar

