Consultor Eletrônico



Kbase P94831: Error 7251, client operatingMode does not match broker operatingMode when attempting to connect to S
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/23/2008
Status: Verified

SYMPTOM(s):

Unable to connect from .Net client to an AppServer running in State-Free operating mode

An unhandled exception of type 'NoAvailableSessionsException' occurred in SomeProxy.dll

Additional information: SessionPool : NoAvailableSessions[Connect failure: client operatingMode does not match broker operatingMode (7251) ]

FACT(s) (Environment):

OpenEdge 10.x
Windows

CAUSE:

The .Net client application has not set the Connection objects SessionModel attribute to one (1) prior to instantiating the Open Client proxy object

FIX:

Modify the .Net application so that the Connection objects SessionModel attribute is set to one (1) before attempting to instantiate the proxy object. Examples in both VB.Net and C#.Net are shown below:

VB.Net Sample

Dim C As New Connection("AppServer://localhost:5162/asbroker1", "", "", "")

C.SessionModel = 1

Dim P As New YourProxy(C)

P.CallSomethingOnTheAppServer()
P.Dispose()

C.ReleaseConnection()
C.Dispose()

C# Sample

Connection C = new Connection("AppServer://localhost:5162/asbroker1", "", "", "");

C.SessionModel = 1;

// No need to explicitly issue Dispose() against 'P' as the using statement will do it automatically

using (YourProxyP = new YourProxy(C))
{
P.CallSomethingOnTheAppServer();
}

C.ReleaseConnection();
C.Dispose();