Client Application as Service

Hi, my today's 2nd question is:

I have a client side class named MyApplication that has many methods like open new forms and load some reports. I initialize this class normally.

The server should know about this class by ref, although I can't pass objects by reference in WCF.

What I was trying to do was open a host of this MyApplication and at server side I created the Channel.

The problem is when I create a new Channel it creates a new instance of that MyApplication and I want the server to catch the already instanced MyApplication.

What should I do to make this work?

Thanx

[601 byte] By [celobateira] at [2008-1-4]
# 1

You should check out InstanceContextMode.PerSession and sessionful bindings. See

http://msdn2.microsoft.com/en-us/library/ms731193.aspx

The basic idea is, in this InstanceContextMode, you can set up a sessionful communication channel and then all operation calls over that channel will talk to the same instance of the server.

BrianMcNamara-MSFT at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 2
Thanx Brian, I'll try that this morning
celobateira at 2007-10-3 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified