开发者

Code First EF Deploy Attempt by Method failed

开发者 https://www.devze.com 2023-01-11 20:17 出处:网络
I have a asp.net mvc 2 on .net 4 with code first entity framework data access. When I deploy to one server it works beautifully, no prizes for guessing it doesnt work on the other...the message howev

I have a asp.net mvc 2 on .net 4 with code first entity framework data access.

When I deploy to one server it works beautifully, no prizes for guessing it doesnt work on the other...the message however I 开发者_Go百科cannot understand

Attempt by method 'System.Data.Entity.ModelConfiguration.Internal.Configuration.CodeFirstCachedMetadataWorkspace.GetProviderInvariantName(System.Data.Common.DbConnection)' to access method 'System.Data.Common.DbProviderServices.GetProviderFactory(System.Data.Common.DbConnection)' failed.


That looks like a Code Access Security error to me. Are both servers configured to run under Full Trust?


I updated .net 4 from 4.0.2**** to 4.0.3***

that fixed it

0

精彩评论

暂无评论...
验证码 换一张
取 消