zoukankan      html  css  js  c++  java
  • "The server has rejected the client credentials"解决方案

    当垮域访问.net Remoting应用程序时,会出现"The server has rejected the client credentials" 错误. 解决方案就是在客户端模拟授权身份登陆.

    客户端代码写法

    RemotingConfiguration.Configure(@"C:\remotingdemo\Client\Client.exe.config", true);
    RemoteObject obj = new RemoteObject();
    ... ...

    配置文件格式:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
     <system.runtime.remoting>
      <application>
       <client>
        <wellknown type="RemotingDemo.RemoteObject, General"
             url="tcp://binsu-***:8001/GetObject" />
       </client>
       <channels>
        <channel ref="tcp" secure="true"
          impersonationLevel="Impersonation" protectionLevel="EncryptAndSign"        
          username="administrator" password="******" domain="binsu-***">
         <clientProviders>
          <formatter ref="binary"/>
         </clientProviders>
         <serverProviders>
          <formatter ref="soap" typeFilterLevel="Full" />
          <formatter ref="binary" typeFilterLevel="Full" />
         </serverProviders>
        </channel>
       </channels>
      </application>
     </system.runtime.remoting>
    </configuration>

    毕!

  • 相关阅读:
    socket的accept函数解析
    c socket(续)
    C socket指南
    网络字节序和本机字节序
    jar包
    RESTful API 设计指南[转]
    理解RESTful架构[转]
    c语言正则表达式
    Fedora设置中文
    创建框架结构的页面2
  • 原文地址:https://www.cnblogs.com/Ring1981/p/677306.html
Copyright © 2011-2022 走看看