Asp.Net Sessions and Web Services

  • Thread starter Thread starter james
  • Start date Start date
J

james

Hey Guys,

I am working on a RIA that uses Flex backed by Asp.Net Web Services,
and I am not sure how to manage user sessions. I have used sessions
in Asp.Net before, but I haven't figured out how to plug my web
service calls into Asp.Net's mechanism, or what the plumbing would
look like to pass the session info back and forth from flex. I don't
feel like I have a good understanding of this (like security
implications, etc). Any comments or pointers in the right direction
are appreciated.

Thanks!
James
 
james said:
I am working on a RIA that uses Flex backed by Asp.Net Web Services,
and I am not sure how to manage user sessions. I have used sessions
in Asp.Net before, but I haven't figured out how to plug my web
service calls into Asp.Net's mechanism, or what the plumbing would
look like to pass the session info back and forth from flex. I don't
feel like I have a good understanding of this (like security
implications, etc). Any comments or pointers in the right direction
are appreciated.

From the point of view of the asp.net web service, you have to enable
sessions (which are disabled by default for web services) in the WebMethod
attribute:

[ WebMethod(EnableSession=true) ]
public void MyMethod(...)
{
...
}

For this to work, the client of the web service needs to accept the
Session Cookie and send it back to the server on each request. If the client
were a .Net application, you would achieve this by means of a
CookieContainer object that you would add to your proxy class. However, I do
not know how to do an equivalent operation with Flex. You would get better
responses to this part in an Adobe forum, rather than a C# one.
 
Back
Top