From: Ron Herhuth on 15 Feb 2010 09:26 I'm using Ajax Callbacks which require a webmethod attribute and require that the method be declared as public shared. In order to access session variable values I have to use httpcontext.cusrrent.session... Isn't this a bad practice in a web application? Isn't there a possiblility of session crossup? What is the correct way to handle this scenerio? Thanks, Ron
From: Patrice on 15 Feb 2010 11:32 Hi, > Isn't this a bad practice in a web application? Isn't there a possiblility > of session crossup? HttpContext.Current is the context for the current request that is processed by your code, not for some randol request that would run at the same time. See also : http://msdn.microsoft.com/en-us/library/byxd99hx(VS.71).aspx#vbtskusingwebmethodattributeenablesession and you'll likely have to check for session timeouts o be on the safe side but basically it should work... -- Patrice
|
Pages: 1 Prev: Prevent ASP.NET page to resend data on refresh? Next: Norwegean language |