Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionidmanager.savesessionid%28v=vs.110%29.aspx" rel="nofollow">SaveSessionID</a> is not supposed to be called from application code which is probably why you are getting unexpected results.</p> <p>I question why you would be trying to set your ASP.NET Session ID manually in the first place (sounds suspicously like <a href="http://en.wikipedia.org/wiki/Session_hijacking" rel="nofollow">hijacking</a>...)? It's safer to simply keep track of your 3rd party session identifier in the active session e.g.</p> <pre><code>Session["3rdPartySessionId"] = sessionId; </code></pre> <hr/> <blockquote> <p>For some reason when I get the postback, my <code>HttpContext.Session.SessionID</code> is different from the user cookie</p> </blockquote> <p>This is because you are using cookie-based session state. From the <a href="http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.sessionid%28v=vs.110%29.aspx" rel="nofollow">docs</a></p> <blockquote> <p>When using cookie-based session state, ASP.NET does not allocate storage for session data until the Session object is used. As a result, a new session ID is generated for each page request until the session object is accessed</p> </blockquote> <p>The request in which you POST to the 3rd party API will not be the same request in which you handle the callback therefore in order to sustain the same session ID you need to <em>initialize</em> the session before you send the first request. Generally, the best way to solve this issue globally across your app is to initialize your session in the Global.asax i.e.</p> <pre><code>protected void Session_Start(Object sender, EventArgs e) { // initialize the session object with "something" Session["Init"] = 0; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload