Domanda

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

È stato utile?

Soluzione

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.

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top