【问题标题】:System.MethodAccessException Only on winhost server. Works on developmentSystem.MethodAccessException 仅在 winhost 服务器上。从事开发工作
【发布时间】:2011-07-27 21:29:27
【问题描述】:

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)' 失败。

我在 winhost 服务器上运行时收到此 System.MethodAccessException 错误。当我在内置 vs 上运行时,它工作正常。无论我在哪里使用,似乎都在多个地方发生

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

任何建议都会很棒。谢谢。

【问题讨论】:

  • 已安装版本的 .Net 服务器与您的开发盒?

标签: vb.net exception data-binding repeater live


【解决方案1】:

启用对您的 web.config 文件的完全信任:

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

【讨论】:

  • 你拯救了我的一天! :-)
猜你喜欢
  • 1970-01-01
  • 2011-03-02
  • 2011-05-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-11-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多