Search code examples
c#asp.netsessionresponse.redirect

Does Response.Redirect use the same session or start a new one?


I would like to be able to use the same Session variable when transferring to another app.

Does Response.Redirect use the same session or start a new one?

I am using c#, aspnet 3.5


Solution

  • Response.Redirect does nothing with the session. The session is tied (typically) to a cookie associated with the URI of the web app. If you switch to another web app on another server or a separate URI, the session will not carry over even if you managed to preserve the cookie.

    Can you clarify what problem it is you're trying to solve?