2013-06-20 50 views
1

我最近添加了第二個網站到我的服務器。該網站給我的可怕:提供程序:SQL網絡接口,錯誤:26 - 錯誤定位服務器/實例指定沒有修復?

System.Data.SqlClient.SqlException: 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)

我不知道爲什麼我得到這個。我已經通過thisthis無濟於事。這是一個新的MVC4應用程序,我在IIS7中的beta.vinformative.com上。另一個站點是vinformative.com上的MVC3站點。它運行良好。兩個數據庫都有完全相同的連接字符串,並且它們都在同一個SQL服務器上。我爲NT Authority \ Network Service給兩個數據庫提供了相同的用戶映射和角色成員資格。

這是我到目前爲止已經試過:

  1. MSSQLSERVER SQL Server服務與SQL Server瀏覽器一起運行,並且SQL Server代理
  2. 我已經添加爲SQL Server防火牆入站規則瀏覽器
  3. 確信TCP/IP是SQL Server配置中啓用
  4. 新增1433端口的TCP到防火牆
  5. 啓用遠程連接到數據庫服務器
  6. ping通的機器
  7. 二手PortQry將看到UDP 1434

的數據庫服務器,我可以連接到該網站在本地,當我遠程登錄到我的服務器。此外,我在錯誤日誌記錄應用程序中有一個ELMAH實例,並且正在更新數據庫。我覺得我正在服用瘋狂的藥丸,因爲這應該是工作,我找不到徹底的錯誤。請幫忙!

這裏是我的連接字符串

<add name="vfContext" connectionString="Data Source=vinformative;Initial Catalog=vf3;Integrated Security=True" providerName="System.Data.SqlClient" /> 

回答

2

可能是EF - see here
據我所知,遠程訪問無法使用「Integrated Security = True」,應該使用「User ID = ******; Password = ****; Integrated Security = False」。

相關問題