无法连接到数据库.请与您的管理员联系. [英] Unable to connect to database. Please contact your Administrator.

查看:1510
本文介绍了无法连接到数据库.请与您的管理员联系.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个添加页面的问题.他们工作约2至3分钟,然后我收到此错误消息无法连接到数据库.请与您的管理员联系.
c#是代码.
SQL Server 2008是数据库.
当时以为会话正在超时,但在Web配置文件中将其设置为2小时.
只有一个用户及其两个页面添加和编辑才会发生这种情况.
每个其他页面都可以与其他用户正常工作.
这是我尝试过的事情:
重建页面四次.
重建数据库.
重建用户帐户
将用户权限更改为admin
将会话超时更改为3小时.
更改用户计算机.
只是这个用户.
我登录并测试并插入数据15分钟没问题.
任何想法.

另外,如果我停止并重新启动IIS,则该页面开始允许输入2分钟,然后中断

I have a problem with two add pages. They work for about 2 to 3 minutes then I get this error message Unable to connect to database. Please contact your Administrator.
c# is the code.
SQL Server 2008 is the database.
Was thinking that is was session was timing out but it set to 2hrs in the web config file.
This is only happening with one user and their two pages Add and edit.
Every other page is working fine with other users.
Here are thing I have tried:
rebuilt the pages four times.
rebuilt the database.
rebuilt the user account
change user permission to admin
change the session timeout to 3hrs.
change user computer.
It''s only this user.
I log in and tested and inserted data for 15 minutes no problem.
any ideas.

Also if I stop and restart IIS the page begin to allow input for 2 minutes then breaks

推荐答案

看起来像在代码中循环了(一遍或一遍)永不结束/中断,要在重新启动IIS之前检查是否是这种情况,请检查IIS和数据库的内存使用情况和cpu,这将告诉您所有信息.
确认后,修复循环
Looks like you have a loop (for or while) in your code that never finishes/breaks, to check if that is the case before you restart IIS, check the memory usage and cpu of IIS and the database, that will tell you everything.
After you confirm it, fix the loop


用户是否需要/在相关服务器上拥有帐户(不是在sql中,而是在包装盒本身上)?
Does the user need/have an account on the server in question (not in sql, but on the box itself)?


这篇关于无法连接到数据库.请与您的管理员联系.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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