RemotingConfiguration.ApplicationName Property

 
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.

Gets or sets the name of a remoting application.

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

Public Shared Property ApplicationName As String

Property Value

Type: System.String

The name of a remoting application.

Exception Condition
SecurityException

At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. This exception is thrown only when setting the property value.

An application name can be set only once, either through the current property or through a configuration file. If an application is running inside a hosted environment, such as Internet Information Services (IIS), this value might have already been set (usually to the virtual directory). The current property will return null if the application name has not been set.

The following code example demonstrates the use of the ApplicationName property to indicate the name of the remoting application. For the full example code, see examples for the RegisterWellKnownClientType and RegisterWellKnownServiceType methods.

ChannelServices.RegisterChannel(New TcpChannel(8082))

RemotingConfiguration.ApplicationName = "HelloServiceApplication"

RemotingConfiguration.RegisterWellKnownServiceType(GetType(HelloService), "MyUri", WellKnownObjectMode.SingleCall)

The following code example demonstrates how to access an object remoted from a named application.

ChannelServices.RegisterChannel(New TcpChannel())

RemotingConfiguration.RegisterWellKnownClientType(GetType(HelloService), "tcp://localhost:8082/HelloServiceApplication/MyUri")

Dim service As New HelloService()

SecurityPermission

for configuration of the remoting infrastructure. Demand value: SecurityAction.Demand; Permission value: SecurityPermissionFlag.RemotingConfiguration

.NET Framework
Available since 1.1
Return to top
Show: