我的全新Server 2008 R2 Server不接受來自我的MVC3應用程序的連接。無法從MVC應用程序連接到SQL Server Express 2008
我一直試圖讓這工作3天。它只是不會通過瀏覽器連接。但是,我可以通過SQL Server Mgmt Studio以用戶憑據登錄,也可以以管理員身份登錄。
我也做了以下內容:
- 設置遠程連接被接受
- 啓用命名管道/ TCP /共享存儲器
- 禁用(即使IIS和SQLEXPRESS在同一機器上運行)用於TCP配置的動態端口(使其變爲空白)
- TCP配置的指定端口
- 禁用的Windows防火牆
我意識到這是一個通用的錯誤,但它只是不會連接。
連接字符串:
add name="Main.ConnectionString"
connectionString="Data Source=.\sqlexpress;Initial Catalog=BJ;User Id=Jameson;Password=pass!;"
我得到以下錯誤(YSOD):
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)
[SqlException (0x80131904): 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)]
如何這個問題能解決?
什麼是您的實例的名稱* SQLEXPRESS *?你的連接字符串是什麼樣的?(當然祕密位已更改) – Tahbaza 2011-03-25 23:54:27