开发者

ASP.NET Session disappear/Reappear

I've been looking over the net, trying to find some body else who has had this problem before me, but nobody is describing the exact situation I'm in. Others have dropping session states that stay ou开发者_如何学运维t, or they have short session states as in like 5 minutes, or something of that nature. My issue however, is that my session state variables seem to be there for one postback, skip out on the next one, and be there again for a third sometimes.

You can log into my website: EpicClanWars.com and then maybe refresh a few pages, then after the 2nd or 3rd different page, you get the login text boxes in the upper right like you are not logged in. But then if you refresh the page again, the site will show you as logged in again.

I am assuming this has something to do with the viewstate, but I don't know much about the ASP.NET viewstate or how to troubleshoot it. To support this, I've received a couple of error messages (which I sadly neglected to save for this post) which pertained to MAC problems, and viewstate problems.

I recently had to reinstall the OS on the machine running my site. When I did that, I reinstalled visual studio, IIS, SQL Server, everything. Before the re-install I did not have this problem. I am using VS.NET 2005, and IIS 7.

What is going on here?


You can log into my website: EpicClanWars.com and then maybe refresh a few pages, then after the 2nd or 3rd different page, you get the login text boxes in the upper right like you are not logged in. But then if you refresh the page again, the site will show you as logged in again.

This is a cache issue. From the moment you have dynamic pages and keep the login on every page, then you need to absolute not keep cached page on client. So your client just read a cached page, after the update its get the new one.

On your page you give you have also a dns issue with the www., check it out and make it work. You need to redirect the www.epicclanwars.com to epicclanwars.com, if you won to keep only one copy. At this time the www.epicclanwars.com, just not working at all.

The "In Process", thats keeps them in memory is not so accurate on a shared environment and maybe lose the sessions if your computer runs on his limits or if you have many restarts of your pool for any reason. Maybe if you not solve the problem with the cache on pages, to think also to move the sessions on the database.

Also check on web.config the sessions, httpCookies, forms, roleManager, must have the domain="epicclanwars.com"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜