wcf跨机器访问的问题
2024-10-18 18:14:57
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,这样在程序运行的时候才不会粗;
最后就是一定要注意把服务端的防火墙关掉,不然也无法卡机器访问,好了就这些,如果还有新的可能导致该问题的情况,还请大家发言!
最新文章
- [Centos]升级安装GCC
- ADT开发AndroidManifest.xml file missing错误
- 二十、【.Net开源】EFW框架核心类库之WebService服务
- UVA 1001 Say Cheese 奶酪里的老鼠(最短路,floyd)
- 08_Spring实现action调用service,service调用dao的过程
- Entity Framework 教程(转)
- HTML5给我们带来了什么
- Dom4j和Xpath(转)
- [问题]安装express,已经加了-g,还是找不到express命令
- 使用 Composer 安装 Laravel 框架
- Android系统对话框
- Druid 配置及内置监控,Web页面查看监控内容 【我改】
- DRF 权限 频率
- 在 JDK 9 中更简洁使用 try-with-resources 语句
- numpy中dtype
- aapt命令获取apk详细信息(包名、版本号、版本名称、兼容api级别、启动Activity等)
- Cannot find entry file index.android.js in any of the roots:[ Android ]
- hadoop11----socket
- oracle 常用的系统表查询
- 洛谷 P3191 [HNOI2007]紧急疏散EVACUATE(网络最大流)
热门文章
- Java Web整合开发(3) -- Servlet
- 微设计(www.weidesigner.com)介绍系列文章(三)
- Mybatis基金会: 经常问的问题FAQ
- Unix / 类 Unix shell 中有哪些很酷很冷门很少用很有用的命令?(转)
- SAE+Java+jetty
- react学习笔记2--练习Demos
- DFS-leetcode Combination Sum I/I I
- JS 添加到事件的多个对象
- javascript系列之DOM(一)
- unity3d NGUI入门(描述和使用插件参数)