zoukankan      html  css  js  c++  java
  • .Net Remoting 排错笔记:System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink.

    异常提示:
    System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink.
    Parameter name: requestMsg


    场景:
    1.用IIS作宿主。
    2.使用BinaryFomatter。
    3.客户端订阅服务器端事件后,服务器端激活事件时产生。

    解决措施:

    在配置文件中将单通道改为双向通道
    原配置文件:

    <system.runtime.remoting>
      
    <application>
        
    <service>
        
    </service>
        
    <channels>
          
    <channel ref="http">
            
    <serverProviders>
              
    <provider ref="binary" typeFilterLevel="Full"/>
            
    </serverProviders>
          
    </channel>
        
    </channels>
      
    </application>
    </system.runtime.remoting>

    新配置文件:
    <system.runtime.remoting>
      
    <application>
        
    <service>
        
    </service>
        
    <channels>
          
    <channel ref="http">
            
    <serverProviders>
              
    <provider ref="binary" typeFilterLevel="Full"/>
            
    </serverProviders>
            
    <clientProviders>
              
    <provider ref="binary"></provider>
            
    </clientProviders>
          
    </channel>
        
    </channels>
      
    </application>
    </system.runtime.remoting>

    测试通过。
  • 相关阅读:
    数据库基础
    Junit单元测试、反射与注解
    Stream流
    Java IO所用类
    字符集
    Lambda表达式
    【jdk1.8源码分析】LinkedHashMap
    线性表
    【jdk1.8源码分析】ArrayList
    java学习血泪史
  • 原文地址:https://www.cnblogs.com/chinadhf/p/958656.html
Copyright © 2011-2022 走看看