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>

    测试通过。
  • 相关阅读:
    小组开发地铁项目
    Qt 编译时遇到 error: [debug/qrc_music.cpp] Error 1
    Qt 使用irrlicht(鬼火)3D引擎
    Qt编译出错:During startup program exited with code 0xc0000135
    Qt 飞机仪表显示
    Qt 在Label上面绘制罗盘
    Qt 播放音频文件
    Git 使用 粗糙记录
    Qt 建立带有子项目的工程
    QSS 的选择器
  • 原文地址:https://www.cnblogs.com/chinadhf/p/958656.html
Copyright © 2011-2022 走看看