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")%>
任何建议都会很棒。感谢。
答案 0 :(得分:2)
在您的web.config文件中启用完全信任:
<configuration>
<system.web>
<trust level="Full" />
</system.web>
</configuration>