This documentation is archived and is not being maintained.

RemotingConfiguration.GetRegisteredWellKnownServiceTypes Method

Retrieves an array of object types registered on the service end as well-known types.

[Visual Basic]
Public Shared Function GetRegisteredWellKnownServiceTypes() As _
   WellKnownServiceTypeEntry()
[C#]
public static WellKnownServiceTypeEntry
   
   GetRegisteredWellKnownServiceTypes();
[C++]
public: static WellKnownServiceTypeEntry*
   GetRegisteredWellKnownServiceTypes() 
   ;
[JScript]
public static function GetRegisteredWellKnownServiceTypes() :
   WellKnownServiceTypeEntry
   ;

Return Value

An array of object types registered on the service end as well-known types.

Exceptions

Exception Type Condition
SecurityException At least one of the callers higher in the callstack does not have permission to configure Remoting types and channels.

Remarks

Well-known object types can be either single call or singleton. If an object type is single call, then a new instance of it is created each time a call from the client comes in. All calls to a singleton object are handled by one instance of that object.

For a more detailed description of well-known objects see Server Activation.

Example

[Visual Basic] 

      ' Retrive the array of objects registered as well known types at
      ' the service end.
      Dim myEntries As WellKnownServiceTypeEntry() = _ 
                       RemotingConfiguration.GetRegisteredWellKnownServiceTypes()
      Console.WriteLine("The number of WellKnownServiceTypeEntries are:" + myEntries.Length.ToString())
      Console.WriteLine("The Object Type is:" + myEntries(0).ObjectType.ToString())
      Console.WriteLine("The Object Uri is:" + myEntries(0).ObjectUri)
      Console.WriteLine("The Mode is:" + myEntries(0).Mode.ToString())
      

[C#] 

   // Retrive the array of objects registered as well known types at
   // the service end.
   WellKnownServiceTypeEntry[] myEntries =
             RemotingConfiguration.GetRegisteredWellKnownServiceTypes();
   Console.WriteLine("The number of WellKnownServiceTypeEntries are:"
                                 +myEntries.Length);
   Console.WriteLine("The Object Type is:"+myEntries[0].ObjectType);
   Console.WriteLine("The Object Uri is:"+myEntries[0].ObjectUri);
   Console.WriteLine("The Mode is:"+myEntries[0].Mode);


[C++] 

   // Retrive the array of objects registered as well known types at
   // the service end.
   WellKnownServiceTypeEntry* myEntries[] =
             RemotingConfiguration::GetRegisteredWellKnownServiceTypes();
   Console::WriteLine(S"The number of WellKnownServiceTypeEntries are:{0}", __box(myEntries->Length));
   Console::WriteLine(S"The Object Type is:{0}", myEntries[0]->ObjectType);
   Console::WriteLine(S"The Object Uri is:{0}", myEntries[0]->ObjectUri);
   Console::WriteLine(S"The Mode is:{0}", __box(myEntries[0]->Mode));

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

RemotingConfiguration Class | RemotingConfiguration Members | System.Runtime.Remoting Namespace | WellKnownServiceTypeEntry | WellKnownClientTypeEntry | RegisterWellKnownServiceType | RegisterWellKnownClientType

Show: