문제

Today I'm trying to host my web site on IIS 8, this web site is developed in .Net MVC. When I'm trying to do a query to SQL server, hosted in another server in my intranet, I have this error message: provider: Named Pipes Provider, error: 40, but if I host my web site on IISExpress(native in Visual Studio), or I do a query from SQL server managemet, all work fine. I use this string connection:

 Data Source=serversql;Initial Catalog=HD;Persist Security Info=True;User ID=sa;Password=******* 

serversql is an alias that points to SQL server hosted in another machine. I have set up it in this way: cliconfg set up Image

도움이 되었습니까?

해결책

In the end, the solution was to enable in the sqlserver's server the TCP connection, and on IIS's machine create an alias TCP to comunicate with server, I think that IIS 8 don't allows NamePipes.

다른 팁

Enable the TCP/IP connection in Sql Server Configuration Manager program and allow the port in the firewall to be sure that's ok.

Name Pipes are available and can be enabled too but default value is false. If set to true, named pipes are flushed when requests are terminated.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top