I'm not sure Micheal, it seems your problem is only connected to having two
requests trying to access the same session data asynch - not that you can't
access the session data at all? Is that correct?
I've not actually come across the problem but i it was me, I'd stick the
values in the database or investigate the cache object perhaps.
You could always try calling ReleaseRequestState from your second call to
force termination of the session lock and update session - not sure if it
would work though, or what any side effects might be throuigh Ajax.
Why dont you ask Scott Guthrie for a recomendation - you would guess he must
have come across this already?
--
--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com http://www.johntimney.com/blog
"Michael Schwarz [MVP]" <no****@schwarz-interactive.dewrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
That means that it is not possible to use Session state information in two
concurrent requests until ReleaseRequestState is called. What do you
recommend to use to communicate between two concurrent calls? Application
is not the correct context.
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/
http://www.ajaxpro.info/
"John Timney (MVP)" <x_****@timney.eclipse.co.ukschrieb im Newsbeitrag
news:Co********************@eclipse.net.uk...
>The session data is not stored until ReleaseRequestState is called - at
the end of the request. Your Ajax method should not use session if you
want dynamic session data across calls from the same sesion client as
marking the method with SessionStateRequirement.ReadWrite will block the
session access until the first request completes. Given what your trying
to do, your perhaps better off not using session.
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Michael Schwarz [MVP]" <no****@schwarz-interactive.dewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>The problem is that one requests changed a session variable that will
not be visible to the other request. Is the session collection only be
updated when request is finished?
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/
http://www.ajaxpro.info/
"John Timney (MVP)" <x_****@timney.eclipse.co.ukschrieb im Newsbeitrag
news:27******************************@eclipse.ne t.uk...
It isn't something as simple as accessing HttpContext.Current.Session
in your ajax server method rather than just session is it and it not
being on context?
--
--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Michael Schwarz" <no****@schwarz-interactive.dewrote in message
news:ee**************@TK2MSFTNGP04.phx.gbl...
Hi John,
>
>
"John Timney (MVP)" <x_****@timney.eclipse.co.ukschrieb im
Newsbeitrag news:pc******************************@eclipse.net. uk...
>Michael,
>>
>Take a quick look at this thread.
>http://www.velocityreviews.com/forum...net-pages.html
>
>
hm, but if I have two requests with the same SessionID (Ajax requests)
and with this I cannot sync both sessions.
>
Example: first request will run for 10 seconds, and the second one
will get the progress. I get it working using SQL Server or static
variables (app wide), but not with the session collection. :(
>
Michael
>
>
>
>
>>
>--
>Regards
>>
>John Timney (MVP)
>VISIT MY WEBSITE:
>http://www.johntimney.com
>http://www.johntimney.com/blog
>>
>>
>>
>"Michael Schwarz" <no****@schwarz-interactive.dewrote in message
>news:Om**************@TK2MSFTNGP04.phx.gbl. ..
>>Hi,
>>>
>>I have a problem where I have two requests (i.e. two different
>>windows that
>>are using the same session) that are accessing the session
>>collection. The
>>requests will need more time on the server, but I get the problem
>>that the
>>two sessions are not getting updated values from each requests. Is
>>this by
>>design or is there any solution to do this?
>>>
>>--
>>Best regards | Schöne Grüße
>>Michael
>>>
>>Microsoft MVP - Most Valuable Professional
>>Microsoft MCAD - Certified Application Developer
>>>
>>http://weblogs.asp.net/mschwarz/
>>http://www.ajaxpro.info/
>>>
>>>
>>
>>
>
>