Asp.net: data entered into session is available while working in Internet Explorer, but not in opera

This is really weird - I have a site that works fine in maxthon (internet browser based browser). I started it in the operating room and found out that the data placed in the session dictionary on one site is not available on the other ... I mean I have a Welcome.aspx where when the following is clicked the following code is executed:

Session["sessionData"] = sessionData;
Response.Redirect("~/Models.aspx");  

      

while debugging i see that in models.aspx the session is empty when executed in opera, but everything is fine when executed in maxthon. has anyone figured out what could be wrong? because I don't know ... is this some kind of opera preference or is it something in the code?

Edit: I checked Session.IsNewSession and when executed in maxthon isnewsession is set to false, but in opera it is true. it seems that in opera, when navigating to a new page, it somehow creates a new session ...

+1


source to share


3 answers


If you write a session on first hit you should do

Response.Redirect("nextpage.asp", false);

      



Otherwise it won't write the entire response request and the cookie may not have been written. You can choose cookiless sessions instead. But then your open to capture the session.

0


source


The ASP.NET session is stored by a key that is saved as a cookie in the browser. Check Opera to make sure it accepts cookies - this is necessary for the ASP.NET session to work properly.



0


source


Opera may have disabled cookies. The session works (except when cookieless is missing in the web.config) by storing the ID in the cookie. If the client does not allow access, the server cannot find the data

0


source







All Articles