Click here to Skip to main content
15,920,031 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
So I'm making a called to a generic handler from ajax. The generic handler is supposed to create a session from an ID retrieve from my database. Currently I'm giving it full read and write permission to sessions with IRequiresSessionState.

The problem is the second time is called again (using the same ajax method) the session appears to be null. I have try with: IE, FF and chrome. The weird part is that if I called the generic handler from another window by typing the URL in the address bar I can see it write the id store in the session the second time its called (Just like it was meant to do).

So the problem seems to be calling it from the ajax method in my Default.aspx page. I try setting that page to read-only to see if it works, but that attempt failed. Try using cookies but got the same results (as expected because sessions use cookies).

Any suggestions?
Posted
Updated 30-Jun-12 6:13am
v2
Comments
Zumicts 30-Jun-12 14:18pm    
Anybody???
Nathan Stiles 30-Jun-12 22:48pm    
No you just forgot to google first.
[no name] 30-Jun-12 23:10pm    
No you just do not realize that is site is full of volunteers and you need to have some patience. We have lives and do not sit and wait for questions to be asked on a website.

1 solution

 
Share this answer
 
Comments
Zumicts 2-Jul-12 11:04am    
Im already implementing that bud. And the problem is actually occurring also with normal web form pages. Seems whenever ajax calls the page for results the sessions timeout automatically (I assume so because the IsNewSession)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900