IChannelReceiver.StopListening Method (Object)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Instructs the current channel to stop listening for requests.

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

[SecurityCriticalAttribute]
void StopListening(
	object data
)

Parameters

data
Type: System.Object

Optional state information for the channel.

Exception Condition
SecurityException

The immediate caller does not have infrastructure permission.

The data object can be used to pass the specific state to the channel.

// Extract the channel URI and the remote well known object URI from the specified URL.
Console.WriteLine("Parsed : " + 
               myHttpServerChannel.Parse(myHttpServerChannel.GetChannelUri()+
                                                      "/SayHello",out myString));
Console.WriteLine("Remote WellKnownObject : " + myString);
Console.WriteLine("Hit <enter> to stop listening...");
Console.ReadLine();
// Stop listening to channel.
myHttpServerChannel.StopListening((object)myPort);

SecurityPermission

for operating with infrastructure code. Demand value: SecurityAction.LinkDemand; Permission value: SecurityPermissionFlag.Infrastructure

.NET Framework
Available since 1.1
Return to top
Show: