随机IIS会话超时 [英] random IIS session timeout

查看:67
本文介绍了随机IIS会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很奇怪的问题,我期待的任何意见。我有一个ASP.NET网站运行了IIS 6其中大部分行之有效的。但是,会议似乎是随机清除?所以,如果我登录...按一下周围,我随机启动的。有时30秒/ 4点击之后的。有时,它是第一个点击,有时甚至不会让我登录......有时它做工精细? (我之所以知道它被清除,因为我打印当我注销了会议,他们是空的)

I have a very strange problem and I am looking for any advice. I have a ASP.NET website running off of IIS 6 which works well for the most part. However, the sessions seem to be randomly cleared? So if I login...click around, i am booted out randomly. Sometimes it's after 30 seconds/4 clicks. Sometimes it's the first click, sometimes it won't even let me login...and sometimes it work fine?? (the reason i know it's being cleared because i print the session when I am logged off, and they are empty)

我已经采取了看IIS日志,但他们不告诉我很多。我怀疑这可能是一个时区问题?..我想知道如果任何人有这是否是一种可能性的知识呢?

I have taken a look at the IIS logs but they don't tell me much. I suspect it might be a timezone problem?,..I was wondering if anyone has any knowledge on whether this is a possibility?

除此之外,我如何能找到更多关于什么是在会话发生任何提示?

Other than that, any tips on how I can find out more on what is happening in the sessions?

到目前为止,关于我的问题的最奇怪的部分是它的随意性。这很可能会成为一个很好的线索为事业的IIS / ASP.NET专家。 (至少我希望如此!)

By far the strangest part about my problem is it's randomness. Which will probably serve as a good clue for the cause for an IIS/ASP.NET expert. (at least I hope so!)

另一条线索:当我本地托管它,当我主持它从我的虚拟服务器GoDaddy的我只得到此问题的网站运行完美。 (这是运行IIS 6)

Another clue: the site works perfect when I host it locally, and I only get the problem when I host it off my virtual godaddy server. (which is running IIS 6)

另一件事我注意到

本地主机上我的饼干看起来像这样:(从萤火虫)
曲奇ASP.NET_SessionId = vgt4ly45frvsm1qsfjsmdcbc;用户名=;演示= TRUE

on local host my cookies look like this: (from firebug) Cookie ASP.NET_SessionId=vgt4ly45frvsm1qsfjsmdcbc; username=; demo=true

托管服务器上它仅仅是这样的:
曲奇ASP.NET_SessionId = vgt4ly45frvsm1qsfjsmdcbc;

on the hosted server it is just this: Cookie ASP.NET_SessionId=vgt4ly45frvsm1qsfjsmdcbc;

用户名是我的会话的名称...也许我对共同主办,这是导致会议无法正常工作?关闭Cookies

"username" is the name of my session...maybe i have cookies disabled on the shared hosting and this is causing the session not to work?

感谢您的时间,
安德鲁

Thanks for your time, Andrew

推荐答案

要回答我的问题:

这个环节是非常有益的:

this link was very helpful:

http://msdn.microsoft.com/en-us/library/ ms972429.aspx

即这一部分:

服务器场的局限性。当用户从服务器的Web服务器场中移动的服务器,他们的会话状态不跟着他们。 ASP会话状态机特有的。每个ASP服务器提供自己的会话状态,除非用户返回到同一台服务器,会话状态无法访问。虽然网络IP层路由解决方案可以解决这样的问题,确保客户端的IP路由到源服务器,一些ISP选择使用为他们的客户代理负载均衡解决方案。最臭名昭著的这些是AOL。解决方案,如要求服务器AOL的prevent网络级路由,因为请求者的IP地址不能保证是独一无二的。

Server farm limitations. As users move from server to server in a Web server farm, their session state does not follow them. ASP session state is machine specific. Each ASP server provides its own session state, and unless the user returns to the same server, the session state is inaccessible. While network IP level routing solutions can solve such problems, by ensuring that client IPs are routed to the originating server, some ISPs choose to use a proxy load-balancing solution for their clients. Most infamous of these is AOL. Solutions such as AOL's prevent network level routing of requests to servers because the IP addresses for the requestor cannot be guaranteed to be unique.

我转我的登录/注销会话是纯粹基于cookie的(所有我需要为我的解决方案)......对于一个更安全的执行力度,我认为ASP.NET内置了档案的...还有... ASP存储在您的DATEBASE .NET会...我不喜欢研究/当时implimenting。

I switched my login/logout session to be purely cookie based (all i need for my solution)...for a more secure implimentation I think ASP.NET has built in Profile's ...as well as...ASP.NET sessions stored in your datebase...which i did not feel like researching /implimenting at the time.

安德鲁

这篇关于随机IIS会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆