Yup... Mostly...

Any idea what form the .NET session token takes and how to access it??

Stephen


Simon Horwith wrote:


It should be no different to doing this with CFML web services or to
building a RIA that accesses persistent information on the server... both
Flash Remoting and Web Services are stateless environments by nature.  By
that I mean that the only way to persist individual session data on the
server and access it via WS or Flash within the context of the current
session is to receive a session token when the log-in code (or any other
initial request that assigns a session token) is run and to pass this token
on subsequent requests.  enerally, a facade pattern is used - so there woud
be one set of services that expect the session token and are an interface to
the other functionality.  This facade service would handle persistance and
use the session token to identify the client.  If you aren't receiving a
session token when logging-in to the .NET application, there are only two
things you can do to persist session information for subsequent requests.
One is to change the .NET authentication so that a token is sent back, and
then to have methods/services that expect this token and use it (as I
outlined above).  The other way to do this would be to persist all data on
yor client (the CF Server in this case) and change the .NET services so that
every serrvice accepts an argument that allows it to recreate all of the
session information before performing it's business logic.  For example, a
shopping cart application would have all the methods you'd expect for adding
an item to the cart, checking-out, etc. and every one of these methods would
accept a serialized cart (an XML representation of the cart) as an argument.
These methods would parse the XML and create a cart object local to the
method, then do what they do, and return a new serialized cart to the
client.  This second approach requires less persistent memory on the server
but is more coding and much more processor intensive for both the server and
the client, and is not recommended.
One thing I'd check is to see whether or not you are actually receiving the
token, but in the form of a cookie rather than a Web Service return value?
If this is the caase, it still remains to be seen whether or not the rest of
the functionality is properly equipped to handle the passing of this token
in order to maintain state.

Does that help at all?

~Simon

Simon Horwith
CTO, Etrilogy Ltd.
Member of Team Macromedia
Macromedia Certified Instructor
Certified Advanced ColdFusion MX Developer
Certified Flash MX Developer
CFDJList - List Administrator
http://www.how2cf.com/


-----Original Message----- From: Stephen Moretti [mailto:[EMAIL PROTECTED] Sent: 14 January 2004 12:28 To: [EMAIL PROTECTED] Subject: [ cf-dev ] Accessing .NET webservices session management


Got a .NET web service that I'm accessing using CF and I've got an issue with the session management.

The web service is using .NETs session management, so I call a login
method on the service, get a success on the login, but that's all I get
back.  No session id or anything like that.

I then call another method which requires me to be logged in. At this
point I get an error telling me that the I need to be logged in. I'm
calling the methods in a cfscript block using cfobject.  I thought that
using cfobject to access web services meant that sessions are
maintained, rather than connecting to a w/s once for each cfinvoke.

Has anyone any experience of calling .NET services and maintaining
session?  Any suggestions?

TIA

Stephen

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]







-- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



Reply via email to