Losing session data in ASP.NET

前端 未结 9 2356
别那么骄傲
别那么骄傲 2021-01-05 16:46

I moved an ASP.NET site running on a server with .NET 1.1 to another server running with .NET 2.0.

In one of the pages I have the following code to detect an expired

9条回答
  •  醉酒成梦
    2021-01-05 17:47

    By default Response.Redirect terminates thread execution and there might be a race conditions in setting session variables. It is described in article Don't redirect after setting a Session variable (or do it right), so try to use another, less violent version:

    Response.Redirect("cpanel.aspx", false); 
    

提交回复
热议问题