RemotingConfiguration.IsWellKnownClientType Method

Definition

Checks whether the specified object type is registered as a well-known client type.

Overloads

IsWellKnownClientType(Type)

Checks whether the specified object Type is registered as a well-known client type.

IsWellKnownClientType(String, String)

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

IsWellKnownClientType(Type)

Checks whether the specified object Type is registered as a well-known client type.

C#
public static System.Runtime.Remoting.WellKnownClientTypeEntry IsWellKnownClientType(Type svrType);

Parameters

svrType
Type

The object Type to check.

Returns

The WellKnownClientTypeEntry that corresponds to the specified object type.

Exceptions

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

Examples

C#
// Check whether the specified object type is registered as
// well known client type or not.
WellKnownClientTypeEntry myWellKnownClientType =
    RemotingConfiguration.IsWellKnownClientType(typeof(MyServerImpl));
Console.WriteLine("The Object type is "
                  +myWellKnownClientType.ObjectType);
Console.WriteLine("The Object Url is "
                  +myWellKnownClientType.ObjectUrl);

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

IsWellKnownClientType(String, String)

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

C#
public static System.Runtime.Remoting.WellKnownClientTypeEntry IsWellKnownClientType(string typeName, string assemblyName);

Parameters

typeName
String

The type name of the object to check.

assemblyName
String

The assembly name of the object to check.

Returns

The WellKnownClientTypeEntry that corresponds to the specified object type.

Exceptions

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

Examples

C#
 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);

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1