开发者

Error connecting to linked server after recompile

开发者 https://www.devze.com 2023-01-07 04:13 出处:网络
I have a ASP.NET MVC website in IIS 7 running against a SQL Server 2008 R2 database, in which I have a linked server set up.The linked server is set up so that a SQL account from my database is linked

I have a ASP.NET MVC website in IIS 7 running against a SQL Server 2008 R2 database, in which I have a linked server set up. The linked server is set up so that a SQL account from my database is linked to a SQL account on the linke开发者_开发百科d server.

All works fine until I recompile my website, and then it can't connect to the linked server anymore and I get this error:

Named Pipes Provider: Could not open a connection to SQL Server [5].

To fix it, I have to open the linked server properties in SQL Server and re-enter the password for the SQL account on the linked server in the Properties dialog and then everything will work again.

Any idea why I have to do this each time and what I can do to fix it?

0

精彩评论

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