2011-01-18 123 views
1

我已经通过我们的数据库MSSQL2005提供商提供的以下细节如何使用MSSQL2005连接到远程服务器IP?

Server IP : 100.20.255.34 
Databaase name : insss 
User: nas0 
password : ymkv45SEv 

我在我的web.config文件中的以下的ConnectionString在我的离线站点:

<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/> 

我想

如何使用上面提供的细节编辑我上面提到的web.config连接字符串,以便它连接到我的MSSQl2005托管提供商....?

我不知道如何编辑连接字符串来做到这一点!

当我运行我的网站www.vbi.volvobusesindia.com然后在页面上方会出现以下错误...

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

+3

我希望那些都不是你真正的数据库登录凭证,Clix。 – 2011-01-18 22:13:19

+1

请不要使用大写锁定,这是非常讨厌的 – RPM1984 2011-01-18 22:31:04

回答

2

这应该只是罚款:

<add name="ConnectionString" connectionString="Data Source=100.20.255.34;Initial Catalog=insss;User ID=nas0;Password=ymkv45SEv;Integrated Security=False" providerName="System.Data.SqlClient"/>