开发者

Connection string to remote sql server

I have a web application - that I open in VS and run su开发者_开发问答ccessfully on my PC.

On a new netbook, I have installed VS 2008 Professional with SP1 and turned on IIS features. Using the exact same solution and code (copied from PC) it will not connect to the database server on the netbook. I do not have SQL server installed on the netbook as the database being used is remote.

The database is located on a hosting provider's database server. So remote connections on the db server is of course enabled. The connection string works when running the web application on VS on my PC so I assume all is OK with the database server configuration and it is something to do with the setup on the netbook.

the error is as such...

The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Any ideas?

Cheers


On the netbook, does VS2008 have access to the internet/network?

Are you accessing the sqlserver via IP or by a network name?


The solution is in the error message you're seeing. On the SQL Server machine, you need to start SQL Server Configuration Manager and enable remote connections via TCP/IP.


By deafult, the remote connection of sql server is disable. You need to enabled that in the sql server configuration.

Good luck.


You should go into Sql Server Configuration Manager and make sure Named Pipes is enabled.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜