2011-01-18 121 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"/>