Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CommunicationObject.Open Method ()

Causes a communication object to transition from the created state into the opened state.

Namespace: System.ServiceModel.Channels
Assembly: System.ServiceModel (in system.servicemodel.dll)

public void Open ()
public final void Open ()
public final function Open ()
Not applicable.

Exception typeCondition

InvalidOperationException

The communication object is not in a Opened or Opening state and cannot be modified.

ObjectDisposedException

The communication object is in a Closing or Closed state and cannot be modified.

CommunicationObjectFaultedException

The communication object is in a Faulted state and cannot be modified.

TimeoutException

The default interval of time that was allotted for the operation was exceeded before the operation was completed.

When a CommunicationObject is instantiated, it begins in the Created state. In the Created state, the object can be configured (for example, properties can be set, or events can be registered), but it is not yet usable to send or receive messages. When called, the Open method causes a CommunicationObject to enter into the Opening state and calls OnOpening, Open, and OnOpened. The OnOpened method completes the Open method by setting the state of the object to the Opened state.

In the

Opened state, the CommunicationObjectis usable (for example, messages can be received), but it is no longer configurable.

There is also an asynchronous version of the open method that is initiated by calling OnBeginOpen and completed by calling EndOpen.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft