我的全新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