wcf跨机器访问的问题

在wcf跨机器的访问中遇到了各种无法访问的问题,本人也是在通过个人解决问题的基础上发表一下自己的经验,如果还有其他方面可能影响wcf跨机器的问题,还希望大家多多发言!

好了废话不多说了,正文如下:

1、设置好wcf的服务端security mode要设置为None,如

 <services>
<service behaviorConfiguration="metadataBehavior" name="Services.CalculatorService">
<endpoint address="http://192.168.1.108:9999/calculatorservice" binding="wsHttpBinding"
bindingConfiguration="NoneSecurity" contract="Contracts.ICalculator" />
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="NoneSecurity">
<!--maxBufferPoolSize="12000000" maxReceivedMessageSize="12000000" useDefaultWebProxy="false">
<readerQuotas maxStringContentLength="12000000" maxArrayLength="12000000"/>-->
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>

这里要注意的是bindingConfiguration="NoneSecurity",<binding name="NoneSecurity">,<security mode="None"/>这三个地方,一定要设好。

然后是客户端中的security mode的设置,如

<binding name="WSHttpBinding_CalculatorService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" />
</security>
</binding>

这里要注意的是<security mode="None">这里也要设置为None,这样在程序运行的时候才不会粗;

最后就是一定要注意把服务端的防火墙关掉,不然也无法卡机器访问,好了就这些,如果还有新的可能导致该问题的情况,还请大家发言!

 
 
 
标签: wcfxml

最新文章

  1. [Centos]升级安装GCC
  2. ADT开发AndroidManifest.xml file missing错误
  3. 二十、【.Net开源】EFW框架核心类库之WebService服务
  4. UVA 1001 Say Cheese 奶酪里的老鼠(最短路,floyd)
  5. 08_Spring实现action调用service,service调用dao的过程
  6. Entity Framework 教程(转)
  7. HTML5给我们带来了什么
  8. Dom4j和Xpath(转)
  9. [问题]安装express,已经加了-g,还是找不到express命令
  10. 使用 Composer 安装 Laravel 框架
  11. Android系统对话框
  12. Druid 配置及内置监控,Web页面查看监控内容 【我改】
  13. DRF 权限 频率
  14. 在 JDK 9 中更简洁使用 try-with-resources 语句
  15. numpy中dtype
  16. aapt命令获取apk详细信息(包名、版本号、版本名称、兼容api级别、启动Activity等)
  17. Cannot find entry file index.android.js in any of the roots:[ Android ]
  18. hadoop11----socket
  19. oracle 常用的系统表查询
  20. 洛谷 P3191 [HNOI2007]紧急疏散EVACUATE(网络最大流)

热门文章

  1. Java Web整合开发(3) -- Servlet
  2. 微设计(www.weidesigner.com)介绍系列文章(三)
  3. Mybatis基金会: 经常问的问题FAQ
  4. Unix / 类 Unix shell 中有哪些很酷很冷门很少用很有用的命令?(转)
  5. SAE+Java+jetty
  6. react学习笔记2--练习Demos
  7. DFS-leetcode Combination Sum I/I I
  8. JS 添加到事件的多个对象
  9. javascript系列之DOM(一)
  10. unity3d NGUI入门(描述和使用插件参数)