开发者

Getting 'Login timeout expired' error in Classic ASP, but not VB6 running from same process

When I run a Classic ASP app on my dev machine, I am getting a "Login timeout expired" error when trying to open a connection to the database (Sql Server 2008). It is returning almost immediately, so it doesn't seem to be a timeout error on the connection. The website and database are both running locally.

This seems to only happen from VBScript, a VB6 dll that is called from the same website (using COM from VBScript) is able to access the database just fine. Also, it worked this morning but I took my laptop home with me and now it doesn't work.

开发者_Go百科

Any ideas what could be causing this?


I figured it out. I had to enable TCP/IP and Named Pipes for Sql Server. I'm not sure why it worked before and not now, but it does work!

To do that,

  • Open Sql Server Configuration Manager (from the Start menu)
  • Select Sql Server Network Configuration -> Protocols for MSSQLSERVER
  • Right-click TCP/IP and Named Pipes and select Enable from the menu
  • Restart the sql server service (same tool, Sql Server Services section)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜