【发布时间】:2011-07-15 13:33:04
【问题描述】:
我正在尝试远程连接,我的 MVC3 上有以下连接字符串,首先使用 EF4 ctp5 代码
<add name="ApplicationServicesX"
connectionString="provider=System.Data.SqlClient;provider connection string='Data Source=asc-svr2;
Initial Catalog=AdventureWorks;Integrated Security=True;Connection Timeout=60;
multipleactiveresultsets=true'" providerName="System.Data.EntityClient" />
它给出了一个错误
[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
和
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
我的控制器是这样的
public ActionResult Index()
{
var post = cmsDB.Posts.ToList();
return View(post);
}
当我在本地机器上运行代码时完全没有问题,但是当我进入 远程连接到 SQL Server 2008 出现问题。
非常感谢您的帮助。
【问题讨论】:
-
远程 SQL 服务器是否允许来自其他服务器的连接?命名管道还是通过 TCP/IP ?
标签: asp.net sql-server asp.net-mvc-3 entity-framework-4