views:

719

answers:

2

So I have a Stateful .NET webservice (C#) that I would like Flex to use. The only problem is that I don't see a cookie being passed, even though I have the WebMethods decorated with:

WebMethod(EnableSession=true)

I can't seem to figure out if it is an issue with Flex or .NET.

Does Flex 3 (as3) pay attention to the session cookie automatically with the generated web service classes? If not what can I do to minimize the code I have to write to get this supported with generated proxy classes.

Code examples, please :)

EDIT 1

I found my own solution.

+1  A: 

I'm sure a Flex expert will be along shortly, but if you connect to it with a browser does the cookie get created/passed?

Slightly off topic, but Flex isn't particularly fast at de/serialisation so have you considered using something like WebORB for your connectivity?

Steven Robbins
ok, I used the "Poster" plugin for FireFox and posted to the webservice and I saw no headers come back! I don't know how to fix that though.
Phobis
I've never used that plugin, I generally use Fidder ( http://www.fiddlertool.com/ ) for debugging web traffic.
Steven Robbins
A: 

I found my issue. I did not set any values to the session, so .NET would not pass a cookie. I had to explicitly set a value then it passed the session header information perfectly:

IE. Session["isActive"] = true;
Phobis