WebPermission.FromXml Method (SecurityElement)

 

Reconstructs a WebPermission from an XML encoding.

Namespace:   System.Net
Assembly:  System (in System.dll)

override FromXml : 
        securityElement:SecurityElement -> unit

Parameters

securityElement
Type: System.Security.SecurityElement

The XML encoding from which to reconstruct the WebPermission.

Exception Condition
ArgumentNullException

The securityElement parameter is null.

ArgumentException

securityElement is not a permission element for this type.

The FromXml method reconstructs a WebPermission from an XML encoding that is defined by the SecurityElement class.

Use the ToXml method to XML-encode the WebPermission, including state information.

The following example creates a System.Security.SecurityElement, populates its attributes, and uses FromXml to transfer this information to an instance of WebPermission.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: