XmlSecureResolver Constructor (XmlResolver^, Evidence^)
Initializes a new instance of the XmlSecureResolver class with the XmlResolver and System.Security.Policy::Evidence specified.
Assembly: System.Xml (in System.Xml.dll)
Parameters
- resolver
-
Type:
System.Xml::XmlResolver^
The XML resolver that is wrapped by the XmlSecureResolver.
- evidence
-
Type:
System.Security.Policy::Evidence^
The evidence used to create the PermissionSet that will be applied to the underlying XmlResolver. The XmlSecureResolver calls the PermissionSet::PermitOnly method on the created PermissionSet before calling GetEntity on the underlying XmlResolver.
Here are some possible scenarios and the type of evidence to provide for each scenario:
If you are working in a fully trusted environment, use your assembly to create the evidence:
If you are working in a semi-trusted environment, you have code or data coming from an outside source, and you know the origin of the outside source and have a verifiable URI, use the URI to create the evidence:
If you are working in a semi-trusted environment and you have code or data coming from an outside source, but you don't know the origin of the outside source, either:
Set the evidence parameter to null. This allows no access to resources.
-or-
If your application requires some access to resources, request evidence from the caller.
Available since 1.1