我已经开发了一个成功托管的应用程序.我已经在使用sql server 2008的服务器上购买了空间.但是我的连接无法打开到该数据库.我正在使用的连接字符串是:
I have developed an application which I have successfully hosted. I have purchased space on a server which uses sql server 2008. But my connection could not open to that database. The connection string i am using is:
this.sConnectionString = "Data Source=***.**.***.***;Initial Catalog=test;User ID=@#$%^&Password=&^%*$#"但这给了我一个例外,说: 建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:命名管道提供者,错误:40-无法打开与SQL Server的连接) 但是,当我使用相同的连接字符串连接到具有不同IP地址和其他凭据的大学服务器时,它将连接起来.请帮帮我.
But it gives me an exception saying that: A network-related or instance-specific error occurred while establishing a connection to SQL Server. 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) But when I use the same connection string to connect to my college server which has different IP address and other credentials it gets connected. Please help me out. Why is this sot that the other server gives me an exception??
推荐答案%^& Password =& ^%* %^&Password=&^%*
#"
但这给了我一个例外,说: 建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:命名管道提供者,错误:40-无法打开与SQL Server的连接) 但是,当我使用相同的连接字符串连接到具有不同IP地址和其他凭据的大学服务器时,它将连接起来.请帮帮我.为什么会这样,以至于另一台服务器给了我一个例外?
But it gives me an exception saying that: A network-related or instance-specific error occurred while establishing a connection to SQL Server. 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) But when I use the same connection string to connect to my college server which has different IP address and other credentials it gets connected. Please help me out. Why is this sot that the other server gives me an exception??
blog.sqlauthority. com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider错误40错误/ [ ^ ]
更多推荐
连接字符串不起作用.无法连接到数据库
发布评论