views:

215

answers:

3

Is there a way to use the same session on different user-agents. I have a flash app that is generating a new session id on posting data to myHandler.ashx ( same happens on aspx ). Am i missing a trick here?

+1  A: 

I have no experience from c# or anything like that, but when doing remoting using amfphp you will sometimes need to supply the session_id variable in your call manually, as the server will for some reason consider you two different users even though it's all going through the same browser.

Often, the simplest way to do this is to supply your swf with the id in a flashvar when loading it. This will require you to print the session_id in the html source, which isn't ideal, but it's not that big of a deal since it can be sniffed very easily anyway.

grapefrukt
+1  A: 

It appears as though it is common to pass the session id through flash vars. I have not done this myself, but a quick Google search with these keys seems to find some promising hits: keep session data flash

Phil
thanks flash var are definitely an option, i was hoping a more secure way.
frosty
+1  A: 

Take a look at swfupload and their implementation in ASP.Net - they use a Global.asax hack in order to keep the same session.

Ron Klein
I haven't checkout swfupload asp.net implementation. But i can confirm Ron is correct that you need to reset the values in the global.asax. This was a really hard bug to find as it appears it was just in ie.
frosty