开发者

System.MethodAccessException Only on winhost server. Works on development

开发者 https://www.devze.com 2023-03-23 21:58 出处:网络
Attempt by method \'Microsoft.VisualBasic.CompilerServices.Symbols+Container.InvokeMethod(Method, System.Object[], Boolean[], System.Reflection.BindingFlags)\' to access method \'System.Data.Objects.M

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

精彩评论

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