- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
只是想知道以前是否有人遇到过这个问题。有几个开发人员看过这个,但我们都无法弄清楚。
我有一个 ASP.NET Web 窗体应用程序使用 EF4 通过别名连接到 Sql Server 数据库。别名设置为指向我的机器名称(不是“.”或“本地”)。当我用 VS2012 运行它时,它工作正常。如果我将它部署到我的本地 IIS7 实例并尝试在浏览器中将其拉出,我会收到错误消息:
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
我的连接字符串如下所示:
Data Source=aliasName;Initial Catalog=databaseName;Integrated Security=True;MultipleActiveResultSets=True
如果我更改连接字符串以便数据源是我的机器名而不是别名,它在 IIS7 中工作正常。因此,问题似乎出在别名上,并且仅在 IIS7 用完时才出现。
作为解决方法,我使用本地构建配置文件来部署不在本地使用别名的不同 web.config,但我真的很想弄清楚为什么它不起作用。
如有任何建议,我们将不胜感激。
最佳答案
检查 this ,具体来说:
使用 SQL Server 别名的先决条件
您必须愿意让您的客户端通过网络协议(protocol)连接到实例。当客户端和实例在同一系统上时,无法使用可用的共享内存连接。我为我的别名使用 TCP/IP 连接。
在托管 SQL Server 实例的系统上,您必须运行 SQL Server Browser 服务(这通常将“启动模式”设置为“自动”)。
在 64 位系统上,如果您同时拥有 32 位和 64 位客户端,则需要为 32 位和 64 位客户端创建别名。
关于asp.net - 通过别名从本地 IIS7 连接到 SQL Server 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16342274/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!