Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, March 1, 2007 4:43 PM
I have a problem with maintaining session id. When I click refresh button (in Firefox on every refresh, in IE every 5.-6. click), or I go to another page session id is changed. There is no difference if I use normal or cookieless session, and it happens in every browser (IE, Firefox and Opera). You can try yourself on this link: http://www.elda.hr/shop/
Can anyone help me?
All replies (6)
Saturday, March 3, 2007 7:42 AM âś…Answered
I've solved the problem (actually my hosting provider). How? I don't know - his answer was that he increased some limits in my app. pool.
Friday, March 2, 2007 12:51 AM
When I had this problem I would assign something into the Session right away. It doesn't have to do anything, but it should keep the ID static.
Session["Variable"] = "StickIt";
Friday, March 2, 2007 2:37 AM
I've tried that (I've assigned session in Page_Load of Default.aspx), but nothing happened, I still have the same problem.
Friday, March 2, 2007 5:05 AM
why u are setting values on Page_Load. look session variable need to be set only once. do one thing. Create a Global.asax file by going to create new and select Global Application Configuration file from the list of templates.
In the Session_Start method of Global.asax file.
just declare your session with nothing
Session("sName") = ""
and set the value for this session where ever you want through out the application even in Page_Load but make sure to check the postback status of the page.
If Page.isPostback = False then
Session("sName") = "any value"
end if
cheers.
Friday, March 2, 2007 5:16 AM
I've tried with Global.asax, but no luck.. Problem is still there...[8o|]
Friday, March 2, 2007 5:23 AM
Maybe I should add that my application works perfect on my local computer, but when I upload it on hosted server, session goes wild.