ASP.NET 超时已过期:Membership.ValidateUser(用户名、密码)
我的 asp.net Web 应用程序在另一台服务器上运行的同一副本时不时地抛出此错误:
超时已过期。 从池中获取连接之前超时时间已过。 发生这种情况的原因可能是所有池连接都在使用中并且已达到最大池大小。
错误发生在以下第 67 行
Line 65:
Line 66: //determine if the user's username/password are valid
Line 67: if (Membership.ValidateUser(userName, password))
Line 68: {
Line 69: userInfo = MembersDB.GetMemberByUserName(Login1.UserName);
有人曾经发生过这种情况吗?
另外,可能需要注意的是,我在另一台拥有更多用户的服务器上运行了这个 Web 应用程序,但我没有这个连接池问题
The same copy of my asp.net web application running on another server keeps throwing this error every now and then:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
The error occurs on the following line 67
Line 65:
Line 66: //determine if the user's username/password are valid
Line 67: if (Membership.ValidateUser(userName, password))
Line 68: {
Line 69: userInfo = MembersDB.GetMemberByUserName(Login1.UserName);
Has anyone ever had this happen?
Also, it may be important to note that I have this very web application running on another server with more users but I don't have this Connection Pool issue
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为简单地提高最大连接池大小应该可以解决您的问题,如下所示:
Data Source=Server;Initial Catalog=TestDB;User ID=TestUser;
Max Pool Size= 300
I think that simply raising the maximum connection pool size should solve your problem, like so:
Data Source=Server;Initial Catalog=TestDB;User ID=TestUser;
Max Pool Size=300