Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Entity framework 方法的代码首次EF部署尝试失败_Entity Framework_Asp.net Mvc 2 - Fatal编程技术网

Entity framework 方法的代码首次EF部署尝试失败

Entity framework 方法的代码首次EF部署尝试失败,entity-framework,asp.net-mvc-2,Entity Framework,Asp.net Mvc 2,我在.NET4上有一个asp.NETMVC2,具有代码优先实体框架数据访问 当我把它部署到一台服务器上时,它工作得很好,猜测它在另一台服务器上不工作是没有好处的……但是我无法理解这条消息 尝试通过方法“System.Data.Entity.ModelConfiguration.Internal.Configuration.CodeFirstCachedMetadataWorkspace.GetProviderInvariantName(System.Data.Common.DbConnectio

我在.NET4上有一个asp.NETMVC2,具有代码优先实体框架数据访问

当我把它部署到一台服务器上时,它工作得很好,猜测它在另一台服务器上不工作是没有好处的……但是我无法理解这条消息


尝试通过方法“System.Data.Entity.ModelConfiguration.Internal.Configuration.CodeFirstCachedMetadataWorkspace.GetProviderInvariantName(System.Data.Common.DbConnection)”访问方法“System.Data.Common.DbProviderServices.GetProviderFactory(System.Data.Common.DbConnection)”'失败。

在我看来,这似乎是一个代码访问安全错误。这两台服务器都配置为在完全信任下运行吗?

I将.net 4从4.0.2****更新为4.0.3***

这就解决了问题