【问题标题】:SerializationException Because of security restrictions, the type System.Runtime.Remoting.ObjRef cannot be accessedSerializationException 由于安全限制,无法访问类型 System.Runtime.Remoting.ObjRef
【发布时间】:2009-05-05 21:13:02
【问题描述】:

我有一个托管在 IIS 下的远程服务器,当我尝试与它交谈时,它会引发以下异常 SerializationException 由于安全限制,无法访问类型 System.Runtime.Remoting.ObjRef。 如果我在自己的 exe 中托管服务器,我没有任何问题。
搜索谷歌,大多数人的解决方法是设置 typeFilterLevel="Full"

<clientProviders>
    <formatter ref="binary" typeFilterLevel="Full"/>
</clientProviders>    
<serverProviders>
     <formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders> 

我在做什么。

我还将信任级别设置为完全,无论如何都应该是默认值。

<system.web>
    <authentication mode="None" />
    <customErrors mode="Off" />
    <compilation defaultLanguage="c#" />
    <trust level="Full"/>
</system.web>

我在 Windows 2003 上使用 IIS 6.0。代码为 .NET 2.0 编译。应用程序池在具有管理权限的帐户下运行。

【问题讨论】:

    标签: .net iis remoting


    【解决方案1】:

    问题最终是错误的频道定义。 serverProviders 标签不在频道内,xml 的缩进使它看起来像它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-13
      • 2016-11-26
      • 2012-03-05
      • 1970-01-01
      • 2020-04-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多