FormatterServices.CheckTypeSecurity Method (Type, TypeFilterLevel)


Determines whether the specified Type can be deserialized with the TypeFilterLevel property set to Low.

Namespace:   System.Runtime.Serialization
Assembly:  mscorlib (in mscorlib.dll)

Public Shared Sub CheckTypeSecurity (
	t As Type,
	securityLevel As TypeFilterLevel


Type: System.Type

The Type to check for the ability to deserialize.

Type: System.Runtime.Serialization.Formatters.TypeFilterLevel

The TypeFilterLevel property value.

Exception Condition

The t parameter is an advanced type and cannot be deserialized when the TypeFilterLevel property is set to Low.

Use this method to determine whether a specified type can be deserialized when the TypeFilterLevel property is set to Low.

.NET Framework remoting provides two levels of automatic deserialization, Low and Full. Low helps protect against deserialization attacks by deserializing only the types associated with the most basic remoting functionality. The Full deserialization level supports automatic deserialization of all types that remoting supports in all situations. For more information about the.NET Framework remoting types that Low and Full support, see [<topic://cpconAutomaticDeserializationInNETRemoting>].

This example shows how to use the FormatterServices class to serialize or deserialize an object where the base class does not implement ISerializable but the derived class does.

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

.NET Framework
Available since 1.1

FormatterServices Class
System.Runtime.Serialization Namespace

Return to top