开发者

System.MethodAccessException Only on winhost server. Works on development

Attempt by method 'Microsoft.VisualBasic.CompilerServices.Symbols+Container.InvokeMethod(Method, System.Object[], Boolean[], System.Reflection.BindingFlags)' to access method 'System.Data.Objects.MaterializedDataRecord.get_Item(System.String)' failed.

I get this System.MethodAccessException error when i run on a winhost server. When I run on built in vs it works fine. Seems to be happeni开发者_开发知识库ng in multiple places wherever i use

 <%# Container.DataItem("Something")%>

Any advice would be great. Thanks.


Enable full trust in your web.config file:

<configuration>
<system.web>
<trust level="Full" />
</system.web>
</configuration>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜