Author: MarcGerritsen | Posted on: 11/3/2010 9:53:54 AM | Views : 313

Hello,
I implemented a SAML2 request in my application and ik works fine for the first few hours.
After some time the method CheckSignature from the class SignedXml throws the following error.

System.Security.SecurityException: XmlResolver can be set only by fully trusted code. ---> System.Security.SecurityException: Request failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.PermissionSet.Demand()
   at System.Xml.XmlDocument.set_XmlResolver(XmlResolver value)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.PermissionSet
The demand was for:
<PermissionSet
version="1"
Unrestricted="true"
Name="FullTrust"/>

The assembly or AppDomain that failed was:
Anonymously Hosted Dyn ...

Go to the complete details ...