Thursday, January 14, 2010

Session loss using AJAX

It sounded strange to me .... but the problem is a prevailing one. Your pages without AJAX works fine while the ones with AJAX doesn't and tend to lose their sessions without giving me errors. In my case I am the admin of a site and can login into anyone's account. I introduced AJAX toolkit for the first time, and while i tried to impersonate as someone else and issued a postback on ajax toolkit containing pages, it reverted me back to my original ID. Tried to find the solution to it, went through various forums but to no avail. Finally i realised that the application is going to the page where i have set the sessions for logging in (in my case i have a login page which is invisible to the user and picks up the credentials automatically from the intranet account)
So went to INETMGR and the properties of my default wesite , then to the tab documents.There i removed the non-important pages and added a single page. It worked for me , might for you, or probably its a specific case. But do give it a shot if u don't find the solution elsewhere.

No comments: