This documentation is archived and is not being maintained.

RemotingConfiguration.IsWellKnownClientType Method (String, String)

Checks whether the object specified by its type name and assembly name is registered as a well-known client type.

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

public static WellKnownClientTypeEntry IsWellKnownClientType (
	string typeName,
	string assemblyName
)
public static WellKnownClientTypeEntry IsWellKnownClientType (
	String typeName, 
	String assemblyName
)
public static function IsWellKnownClientType (
	typeName : String, 
	assemblyName : String
) : WellKnownClientTypeEntry
Not applicable.

Parameters

typeName

The type name of the object to check.

assemblyName

The assembly name of the object to check.

Return Value

The WellKnownClientTypeEntry that corresponds to the specified object type.

Exception typeCondition

SecurityException

At least one of the callers higher in the callstack does not have permission to configure remoting types and channels.

 MyServerImpl myObject = new MyServerImpl();
 // Get the assembly for the 'MyServerImpl' object.
 Assembly myAssembly = Assembly.GetAssembly(typeof(MyServerImpl));
 AssemblyName myName = myAssembly.GetName();
// Check whether the specified object type is registered as
// well-known client type.
WellKnownClientTypeEntry myWellKnownClientType =
   RemotingConfiguration.IsWellKnownClientType(
                     (typeof(MyServerImpl)).FullName,myName.Name);
Console.WriteLine("The Object type :"
                +myWellKnownClientType.ObjectType);
Console.WriteLine("The Object Uri :"
                +myWellKnownClientType.ObjectUrl);

MyServerImpl myObject = new MyServerImpl();
// Get the assembly for the 'MyServerImpl' object.
Assembly myAssembly = Assembly.GetAssembly(MyServerImpl.class.
    ToType());
AssemblyName myName = myAssembly.GetName();
// Check whether the specified object type is registered as
// well-known client type.
WellKnownClientTypeEntry myWellKnownClientType = 
    RemotingConfiguration.IsWellKnownClientType(MyServerImpl.class.
    ToType().get_FullName(), myName.get_Name());
Console.WriteLine("The Object type :" + myWellKnownClientType.
    get_ObjectType());
Console.WriteLine("The Object Uri :" + myWellKnownClientType.
    get_ObjectUrl());

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: