I have a WS that I call that with one method 'logs in' to a COM object
and then, with a 2nd method makes a call to the COM object and returns
some data.
Used from a web app this runs fine. This appears to be because I
always connect to the same Session on the WS Server and the
'logged-in' COM object is stored in the Session object.
If I try and do the same thing from a client-side app each call the WS
creates a new session so my 2nd call fails 'cos it can't find the
'logged-in' COM object.
I know that this is a bit vague, but does anyone have any suggestions
about how I can get the 2nd and subsequent calls to use the same
session as the one I started with my first call?

Signature
Stuart
See headers for PGP Key.
If you think nobody cares whether you're alive or dead, try missing a
couple of mortgage payments.
Stuart Hemming (via DFN-CIS NetNews Service) - 26 Nov 2004 17:09 GMT
On 26/11/2004, around 17:06, Stuart Hemming (via DFN-CIS NetNews Service) wrote:
SH> I know that this is a bit vague, but does anyone have any suggestions
SH> about how I can get the 2nd and subsequent calls to use the same
SH> session as the one I started with my first call?
It seems that System.Net.CookieContainer() is your friend. The thing
is I'm using this in my Web app but it hadn't registered that I could
use it in a client app too.

Signature
Stuart
See headers for PGP Key.
The Benefits of Being Over Sixty ( 3) : Your joints are more accurate
meteorologists than the national weather service.
Scott Meddows - 02 Dec 2004 17:57 GMT
Can you just change your WS definition to log you in AND receive the data?
I have a WS that I call that with one method 'logs in' to a COM object
and then, with a 2nd method makes a call to the COM object and returns
some data.
Used from a web app this runs fine. This appears to be because I
always connect to the same Session on the WS Server and the
'logged-in' COM object is stored in the Session object.
If I try and do the same thing from a client-side app each call the WS
creates a new session so my 2nd call fails 'cos it can't find the
'logged-in' COM object.
I know that this is a bit vague, but does anyone have any suggestions
about how I can get the 2nd and subsequent calls to use the same
session as the one I started with my first call?

Signature
Stuart
See headers for PGP Key.
If you think nobody cares whether you're alive or dead, try missing a
couple of mortgage payments.
Stuart Hemming (via DFN-CIS NetNews Service) - 03 Dec 2004 09:12 GMT
On 02/12/2004, around 09:10, Scott Meddows wrote:
SM> Can you just change your WS definition to log you in AND receive the data?
NO, not really. The WS is the data interface layer for an interactive
activity so it's a case of Log in, get some data, present it to the
user, take the user's reaction to that data and get some more. This
latter action has to be done in the context of what has gone on
before.

Signature
Stuart
See headers for PGP Key.
Those who live by the sword get shot by those who don't.