SQL Server 访问 ASP.NET 配置文件提供程序超时

发布于 2024-10-10 08:49:26 字数 618 浏览 0 评论 0原文

嗯,奇怪的是:我的 ASP.NET 2.0 网站突然开始抛出 SQL Server 超时错误。唯一的解决方案是重新启动 SQL Server。 Web 服务器上的 IISRESET 无法修复此问题。

从 ASP.NET 用户配置文件读取(或写入)时似乎会发生错误。

如果我直接通过 SQL Server Management Studio 连接到数据库,我可以很好地读取和写入 aspnet_profile 表。

当谷歌搜索时,我发现了一个建议:确保 machine.config 中没有其他提供程序,并且我的 web.config 中有一个 CLEAR 元素来清除这些提供程序。果然有。所以我的第一步是在我的 web.config 中添加 CLEARs。这样做了,但错误仍然存​​在。然后我进入 .NET 2.0 区域中的 machine.config 并清除 SQLexpress 条目和提供程序(其中 3 个)。还是没有骰子。

我想尝试在不重新启动数据库服务器的情况下解决根本问题。

请注意,访问数据库但不访问配置文件的页面可以正常工作。顺便说一句,有 2 个连接字符串 - 一个用于提供程序(成员身份、角色、配置文件和 Web 部件),另一个用于应用程序数据访问。

有什么建议吗????

谢谢, 克里普

Hmm, strange one: My ASP.NET 2.0 website all of a sudden starts throwing SQL Server timeout errors. Only solution is to reboot SQL Server. IISRESET on web server doesn't fix it.

Error seems to occur when reading (or writing) from ASP.NET user profile.

If I connect to database directly via SQL Server Management Studio, I can read and write to the aspnet_profile table just fine.

When Googling I discovered one suggestion: to make sure there aren't other providers in machine.config and that I've got a CLEAR element in my web.config to clear those out. Sure enough there were. So my first step was to add in CLEARs in my web.config. Did that and still the error. Then I went into machine.config in the .NET 2.0 area and cleared out the SQLexpress entry and the providers (3 of them). Still no dice.

I want to try and solve the root problem without rebooting the database server.

Note that pages that access the database but not the profile work just fine. BTW, there are 2 connection strings - one for the providers (membership, role, profile, and webparts) and the other for the app data access.

Any suggestions????

Thanks,
Krip

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

动次打次papapa 2024-10-17 08:49:26

我相信我已经解决了问题。 get 和 set 配置文件属性存储过程更新 aspnet_users 表上的 LastActivityDate。这是悬着的。在用户表上有这么多不必要的更新不是一个好主意。我对此发表了评论,目前一切都很好。

I believe I've solved the problem. The get and set profile properties stored procedures update the LastActivityDate on the aspnet_users table. This was hanging. Not a good idea to have so many unnecessary udpates on users table. I commented that out and all is fine for the moment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文