ASP.NET 1.1上的数据库连接问题 [英] Problems with DB connection on ASP.NET 1.1

查看:69
本文介绍了ASP.NET 1.1上的数据库连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hey Dudes

我在ASP.NET 1.1 Web应用程序上创建数据库连接时遇到了一个奇怪的问题。

每隔几天就会有一次Connection.Open ()函数只是冻结,直到它超时,从那一刻起,每次尝试从应用程序创建数据库连接都得到相同的结果,直到我重新启动IIS服务,但我仍然可以从winforms连接到同一个数据库应用程序,使用完全相同的连接字符串。我在具有四核CPU的Windows 2003服务器计算机上使用ASP.NET 1.1,并且在同一台计算机上使用SQL Server 2000(连接是本地的)。

任何想法,任何人?

谢谢,

Omer

Hey Dudes
I''m having a wierd problem creating a DB connection on a ASP.NET 1.1 web app.
Once every few days the Connection.Open() function just freezes till it gets a timeout, and from that moment and on every attempt to create a db connection from the application gets the same result until I restart the IIS service, but I can still connect to the same DB from a winforms app, using the exact same connection string. I''m using ASP.NET 1.1 over a windows 2003 server machine with a quad-core CPU, and SQL server 2000 on the same machine (connection is local).
any ideas, anyone?
Thanks,
Omer

推荐答案

我建议的第一件事就是确保你已经关闭了ASP.NET Web应用程序中的所有数据库连接。
The first thing I''d suggest is to make sure that you have closed all database connections in your ASP.NET web application.


谢谢,但我已经完成了......我在一个断开连接的模型中工作,我只是在需要的时候打开连接,然后马上关闭它......

还是有什么我没想到的?
Thanks, but I''ve already done that... I work in a disconnected model, I just open the connection when I need something, and then close it right away...
or is there something I didn''t think of?


确保您声明了数据库连接的新实例。它可能会挂起,因为即使你告诉它关闭它仍然是开放的。我以前遇到过类似的问题。
Make sure that you are declaring a new instance of the DB connection. It may be hanging up because it is still open even though you are telling it to close. I was having a similar problem before.
展开 | 选择 | Wrap | 行号


这篇关于ASP.NET 1.1上的数据库连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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