System.Runtime.Remoting.Services.RemotingClientProxy Class

Assembly: System.Runtime.Remoting.dll
Namespace: System.Runtime.Remoting.Services
Summary
The abstract base class for proxies to well-known objects generated by the .
C# Syntax:
public abstract class RemotingClientProxy : Component
Remarks
RemotingClientProxy provides access to the frequently used properties for SOAPSUDS generated proxies that point to well-known objects (XML Web services).
See also:
System.Runtime.Remoting.Services Namespace

System.Runtime.Remoting.Services.RemotingClientProxy Member List:

Public Properties
AllowAutoRedirect Read-write

Gets or sets a value indicating whether the automatic handling of server redirects is enabled.
Container
(inherited from System.ComponentModel.Component)
Read-only

See base class member description: System.ComponentModel.Component.Container


Gets the IContainer that contains the Component.
Cookies Read-only

Gets the cookies received from the server that will be sent back on requests that match the cookie's path.
Domain Read-write

Gets or sets the domain name to be used for basic authentication and digest authentication.
EnableCookies Read-write

Password Read-write

Gets or sets the password to use for basic authentication and digest authentication.
Path Read-write

Gets or sets the base URL to the server to use for requests.
PreAuthenticate Read-write

Gets or sets a value indicating whether preauthentication of requests is enabled.
ProxyName Read-write

Gets or sets the name of the proxy server to use for requests.
ProxyPort Read-write

Gets or sets the port number of the proxy server to use for requests.
Site
(inherited from System.ComponentModel.Component)
Read-write

See base class member description: System.ComponentModel.Component.Site


Gets or sets the ISite of the Component.
Timeout Read-write

Gets or sets the time-out in milliseconds to use for synchronous calls.
Url Read-write

Gets or sets the base URL to the server to use for requests.
UserAgent Read-write

Gets or sets the user agent HTTP header for the request.
Username Read-write

Gets or sets the user name to send for basic authentication and digest authentication.
Public Methods
CreateObjRef
(inherited from System.MarshalByRefObject)
See base class member description: System.MarshalByRefObject.CreateObjRef


Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Dispose
(inherited from System.ComponentModel.Component)
Overloaded:
Dispose()

See base class member description: System.ComponentModel.Component.Dispose


Releases all resources used by the Component.
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetLifetimeService
(inherited from System.MarshalByRefObject)
See base class member description: System.MarshalByRefObject.GetLifetimeService


Retrieves the current lifetime service object that controls the lifetime policy for this instance.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
InitializeLifetimeService
(inherited from System.MarshalByRefObject)
See base class member description: System.MarshalByRefObject.InitializeLifetimeService


Obtains a lifetime service object to control the lifetime policy for this instance.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Public Events
Disposed
(inherited from System.ComponentModel.Component)
See base class member description: System.ComponentModel.Component.Disposed


Adds an event handler to listen to the Component.Disposed event on the component.
Protected Constructors
ctor #1 Default constructor. This constructor is called by derived class constructors to initialize state in this type.
Protected Fields
_tp The Transparent Proxy inside the RemotingClientProxy object.
_type Indicates the Type of the object that the current proxy represents.
_url Indicates the URL of the object that the current proxy represents.
Protected Properties
DesignMode
(inherited from System.ComponentModel.Component)
Read-only

See base class member description: System.ComponentModel.Component.DesignMode


Gets a value that indicates whether the Component is currently in design mode.
Events
(inherited from System.ComponentModel.Component)
Read-only

See base class member description: System.ComponentModel.Component.Events


Gets the list of event handlers that are attached to this Component.
Protected Methods
ConfigureProxy Internal. Automatically configures the proxy by loading the channels if they are not already loaded and creating the proxy.
ConnectProxy Internal. Connects the proxy to the remoting channel specified by the RemotingClientProxy.Url property.
Dispose
(inherited from System.ComponentModel.Component)
Overloaded:
Dispose(bool disposing)

See base class member description: System.ComponentModel.Component.Dispose


Releases the unmanaged resources used by the Component and optionally releases the managed resources.
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
GetService
(inherited from System.ComponentModel.Component)
See base class member description: System.ComponentModel.Component.GetService


Returns an object that represents a service provided by the Component or by its Container.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Runtime.Remoting.Services.RemotingClientProxy Member Details

ctor #1
Summary:
Default constructor. This constructor is called by derived class constructors to initialize state in this type.
C# Syntax:
protected RemotingClientProxy();

Return to top


Field: _tp
Summary
The Transparent Proxy inside the RemotingClientProxy object.
C# Syntax:
protected object _tp;

Return to top


Field: _type
Summary
Indicates the Type of the object that the current proxy represents.
C# Syntax:
protected Type _type;
Remarks
The Type of the object that the current proxy represents.

Return to top


Field: _url
Summary
Indicates the URL of the object that the current proxy represents.
C# Syntax:
protected string _url;
Remarks
The URL of the object that the current proxy represents.

Return to top


Property: AllowAutoRedirect (read-write)
Summary
Gets or sets a value indicating whether the automatic handling of server redirects is enabled.
C# Syntax:
public bool AllowAutoRedirect {get; set;}

Return to top


Property: Container (read-only)
Inherited
See base class member description: System.ComponentModel.Component.Container

Summary
Gets the IContainer that contains the Component.
C# Syntax:
public IContainer Container {get;}
Remarks
The components in a container are tracked in a first-in, first-out list, which also defines the order of the components within the container. The last component added is the last component in the list.
See also:
IContainer | Container

Return to top


Property: Cookies (read-only)
Summary
Gets the cookies received from the server that will be sent back on requests that match the cookie's path.
C# Syntax:
public object Cookies {get;}
Remarks
To use this property the RemotingClientProxy.EnableCookies property must be true.

Return to top


Property: DesignMode (read-only)
Inherited
See base class member description: System.ComponentModel.Component.DesignMode

Summary
Gets a value that indicates whether the Component is currently in design mode.
C# Syntax:
protected bool DesignMode {get;}
Remarks
The design mode indicator is stored in the ISite; therefore, if the Component does not have an ISite associated with it, this property is always false.
See also:
IContainer | Container | ISite

Return to top


Property: Domain (read-write)
Summary
Gets or sets the domain name to be used for basic authentication and digest authentication.
C# Syntax:
public string Domain {get; set;}
Remarks
For more information on remoting security and authentication methods, see the conceptual topic at MSDN: Security.
See also:
MSDN: internetsecurity

Return to top


Property: EnableCookies (read-write)
Summary
Gets or sets a value indicating whether the handling of cookies received from the server is enabled.
C# Syntax:
public bool EnableCookies {get; set;}

Return to top


Property: Events (read-only)
Inherited
See base class member description: System.ComponentModel.Component.Events

Summary
Gets the list of event handlers that are attached to this Component.
C# Syntax:
protected EventHandlerList Events {get;}
Remarks
For more information about handling events, see the conceptual topic at MSDN: eventsoverview.
See also:
EventHandlerList

Return to top


Property: Password (read-write)
Summary
Gets or sets the password to use for basic authentication and digest authentication.
C# Syntax:
public string Password {get; set;}
Remarks
For more information on remoting security and authentication methods, see the conceptual topic at MSDN: Security.
See also:
MSDN: internetsecurity

Return to top


Property: Path (read-write)
Summary
Gets or sets the base URL to the server to use for requests.
C# Syntax:
public string Path {get; set;}

Return to top


Property: PreAuthenticate (read-write)
Summary
Gets or sets a value indicating whether preauthentication of requests is enabled.
C# Syntax:
public bool PreAuthenticate {get; set;}

Return to top


Property: ProxyName (read-write)
Summary
Gets or sets the name of the proxy server to use for requests.
C# Syntax:
public string ProxyName {get; set;}

Return to top


Property: ProxyPort (read-write)
Summary
Gets or sets the port number of the proxy server to use for requests.
C# Syntax:
public int ProxyPort {get; set;}

Return to top


Property: Site (read-write)
Inherited
See base class member description: System.ComponentModel.Component.Site

Summary
Gets or sets the ISite of the Component.
C# Syntax:
public virtual ISite Site {get; set;}
Implements:
IComponent.Site
Remarks
A Component will have an ISite if it has been added to an IContainer and the IContainer assigns an ISite to it. The IContainer is responsible to assign the ISite to the Component. Changing the value of the component's ISite does not necessarily change the name of the site the Component is assigned to. It is strongly suggested that the setting of the Component.Site property only be done by an IContainer.

The property value is null if the Component is removed from its IContainer. Assigning null to this property does not necessarily remove the Component from the IContainer.

A Component might or might not have a name. If a Component is given a name, the name must be unique among other Component objects within its IContainer. The ISite stores the name of the Component; therefore, you can only name a Component if it has an ISite associated with it.

See also:
IContainer | Container | ISite

Return to top


Property: Timeout (read-write)
Summary
Gets or sets the time-out in milliseconds to use for synchronous calls.
C# Syntax:
public int Timeout {get; set;}
Remarks
The default value of the RemotingClientProxy.Timeout property is -1, and indicates that a time-out never occurs (infinite time-out).

Return to top


Property: Url (read-write)
Summary
Gets or sets the base URL to the server to use for requests.
C# Syntax:
public string Url {get; set;}

Return to top


Property: UserAgent (read-write)
Summary
Gets or sets the user agent HTTP header for the request.
C# Syntax:
public string UserAgent {get; set;}

Return to top


Property: Username (read-write)
Summary
Gets or sets the user name to send for basic authentication and digest authentication.
C# Syntax:
public string Username {get; set;}
Remarks
For more information on remoting security and authentication methods, see the conceptual topic at MSDN: Security.
See also:
MSDN: internetsecurity

Return to top


Method: ConfigureProxy(
   Type type,
   string url
)
Summary
Internal. Automatically configures the proxy by loading the channels if they are not already loaded and creating the proxy.
C# Syntax:
protected void ConfigureProxy(
   Type type,
   string url
);
Parameters:

type

The Type of the object that the current proxy represents. The Type of the object that the current proxy represents.

url

The URL of the object that the current proxy represents.

Return to top


Method: ConnectProxy()
Summary
Internal. Connects the proxy to the remoting channel specified by the RemotingClientProxy.Url property.
C# Syntax:
protected void ConnectProxy();

Return to top


Method: CreateObjRef(
   Type requestedType
)
Inherited
See base class member description: System.MarshalByRefObject.CreateObjRef

Summary
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
C# Syntax:
public virtual ObjRef CreateObjRef(
   Type requestedType
);
Parameters:

requestedType

The Type of the object that the new ObjRef will reference.

Return Value:
Information required to generate a proxy.
Exceptions
Exception Type Condition
RemotingException This instance is not a valid remoting object.

Return to top


Overloaded Method: Dispose()
Inherited
See base class member description: System.ComponentModel.Component.Dispose

Summary
Releases all resources used by the Component.
C# Syntax:
public void Dispose();
Implements:
IDisposable.Dispose
Remarks
Calling Component.Dispose allows the resources used by the Component to be reallocated for other purposes. For more information about Component.Dispose, see the conceptual topic at MSDN: cleaningupunmanagedresources.
See also:
IContainer | Container

Return to top


Overloaded Method: Dispose(
   bool disposing
)
Inherited
See base class member description: System.ComponentModel.Component.Dispose

Summary
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
C# Syntax:
protected virtual void Dispose(
   bool disposing
);
Parameters:

disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks
This method is called by the public Dispose method and the Object.Finalize method.Dispose() invokes the protected Dispose(Boolean) method with the disposing parameter set to true. Object.Finalize invokes Dispose with disposing set to false.

When the disposing parameter is true, this method releases all resources held by any managed objects that this Component references. This method invokes the Dispose() method of each referenced object.



Notes to inheritors: Dispose can be called multiple times by other objects. When overriding Dispose(Boolean), be careful not to reference objects that have been previously disposed of in an earlier call to Dispose. For more information about how to implement Dispose(Boolean), see the conceptual topic at MSDN: implementingdisposemethod.

For more information about Dispose and Object.Finalize, see the conceptual topic at MSDN: cleaningupunmanagedresources and the conceptual topic at MSDN: overridingfinalizemethod.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~RemotingClientProxy();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetLifetimeService()
Inherited
See base class member description: System.MarshalByRefObject.GetLifetimeService

Summary
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
C# Syntax:
public object GetLifetimeService();
Return Value:
An object of type ILease used to control the lifetime policy for this instance.
Remarks
For more information about lifetime services, see the LifetimeServices class.

Return to top


Method: GetService(
   Type service
)
Inherited
See base class member description: System.ComponentModel.Component.GetService

Summary
Returns an object that represents a service provided by the Component or by its Container.
C# Syntax:
protected virtual object GetService(
   Type service
);
Parameters:

service

A service provided by the Component.

Return Value:
An Object that represents a service provided by the Component.

This value is null if the Component does not provide the specified service.

Remarks
This method can be overridden by a derived class.
See also:
IContainer | Container | ISite | IServiceProvider

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: InitializeLifetimeService()
Inherited
See base class member description: System.MarshalByRefObject.InitializeLifetimeService

Summary
Obtains a lifetime service object to control the lifetime policy for this instance.
C# Syntax:
public virtual object InitializeLifetimeService();
Return Value:
An object of type ILease used to control the lifetime policy for this instance. This is the current lifetime service object for this instance if one exists; otherwise, a new lifetime service object initialized to the value of the LifetimeServices.LeaseManagerPollTime property.
Remarks
For more information about lifetime services, see the LifetimeServices class.
Example
The following code example demonstrates creating a lease.
 public class MyClass : MarshalByRefObject
 {
   public override Object InitializeLifetimeService()
   {
     ILease lease = (ILease)base.InitializeLifetimeService();
     if (lease.CurrentState == LeaseState.Initial)
     {
          lease.InitialLeaseTime = TimeSpan.FromMinutes(1);
          lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
           lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
     }
       return lease;
   }
 }

    

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Event: Disposed
Inherited
See base class member description: System.ComponentModel.Component.Disposed

Summary
Adds an event handler to listen to the Component.Disposed event on the component.
C# Syntax:
public event EventHandler Disposed;
Remarks
When you create a Component.Disposed delegate, you identify the method that handles the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about the event handler delegates, see the conceptual topic at MSDN: eventsdelegates.
See also:
EventHandler

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.