Try OpenEdge Now
skip to main content
.NET Open Clients
Connecting to an AppServer : Establishing the connection
 

Establishing the connection

To establish a connection to an AppServer, you must instantiate an AppObject. You can create an AppObject using one of the four available constructors.
The following constructor establishes an AppServer connection, with the AppServer information specified in the Connection object (connectObj):

Syntax

Where AppObject is the name of the AppObject as defined in ProxyGen.
A connection object can be instantiated with one of the constructors documented in Connection class.
public AppObject(Progress.Open4GL.Proxy.Connection connectObj)
The following constructor establishes an AppServer connection, with the specified AppServer connection information (url), user ID, password, and information required by the AppServer application at connection time:

Syntax

public AppObject(string url, string userid, string password,
     string appserver-info)
Where AppObject is the name of the AppObject as defined in ProxyGen.
Note: For an HTTPS connection using the AppServer Internet Adapter (AIA) with the Web server running on the .NET Open Client machine, you must specify the Internet host name (not"localhost") in the url parameter exactly as it appears in the CN field of the Web server certificate.
For more information on the AppServer URL connection parameter format and default connection information, see the sections on connecting to an AppServer using a URL in OpenEdge Application Server: Developing AppServer Applications.
The following constructor establishes an AppServer connection, with the specified user ID, password, and information required by the AppServer application at connection time:

Syntax

public AppObject(string userid, string password, string appserver-info)
Where AppObject is the name of the AppObject as defined in ProxyGen.
The constructor above uses default AppServer connection information. This constructor defaults the URL to AppServer://localhost:5162/appService, where appService is the AppService Name setting specified in the general settings of the ProxyGen Generate Proxies dialog box.
The following constructor establishes an AppServer connection, with no specified AppServer information:

Syntax

public AppObject( )
Where AppObject is the name of the AppObject as defined in ProxyGen.
The constructor above uses default AppServer connection information. This defaults the URL to AppServer://localhost:5162/appService, where appService is the AppService Name setting specified in the general settings of the ProxyGen Generate Proxies dialog box.
Also see the information on connecting to an AppServer in OpenEdge Development: Open Client Introduction and Programming.
* Handling connection exceptions
* Returning a user defined string to the client from the AppServer connection procedure
* Supported AppServer modes
* Releasing a session-free Connection object