WCF 安全性 之 None
案例下载
http://download.csdn.net/detail/woxpp/4113172
服务端配置代码
<system.serviceModel>
<services>
<service name="WcfServiceLibrary.ServiceTcp">
<endpoint address="net.tcp://localhost:8731/WcfServiceLibrary"
binding="netTcpBinding" bindingConfiguration="testnetTcpBinding"
contract="WcfServiceLibrary.IServiceTcp">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/WcfServiceLibrary" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 为避免泄漏元数据信息,
请在部署前将以下值设置为 false 并删除上面的元数据终结点 -->
<serviceMetadata httpGetEnabled="True"/>
<!-- 要接收故障异常详细信息以进行调试,
请将以下值设置为 true。在部署前设置为 false
以避免泄漏异常信息-->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="testnetTcpBinding">
<security mode="None"></security>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
客户端调用代码 通过代理 代理生成 参见
http://www.cnblogs.com/woxpp/p/6232298.html
客户端调用代码
private void btnTest_Click(object sender, EventArgs e)
{
NetTcpBinding netTcp = new NetTcpBinding();
ChannelFactory<IServiceTcp> ftc = new ChannelFactory<IServiceTcp>();
netTcp.Security.Mode = SecurityMode.None;
IServiceTcp proxy = ChannelFactory<IServiceTcp>.CreateChannel(netTcp, new EndpointAddress("net.tcp://127.0.0.1:8731/WcfServiceLibrary"));
txtMessage.Text = proxy.GetDataUsingDataContract(new WcfServiceLibrary.CompositeType() { StringValue = "sssss" }).StringValue; }
WCF 安全性 之 None的更多相关文章
- WCF 安全性之 自定义用户名密码验证
案例下载 http://download.csdn.net/detail/woxpp/4113172 客户端调用代码 通过代理类 代理生成 参见 http://www.cnblogs.com/woxp ...
- WCF 安全性 之 自定义证书验证
案例下载 http://download.csdn.net/detail/woxpp/4113172 客户端调用代码 通过代理类 代理生成 参见 http://www.cnblogs.com/woxp ...
- WCF 安全性 之 Windows
案例下载 http://download.csdn.net/detail/woxpp/4113172 服务端配置代码 <system.serviceModel> <services& ...
- WCF之安全性
WCF 客户端代理生成 通过SvcUtil.exe http://www.cnblogs.com/woxpp/p/6232298.html WCF 安全性 之 None http://www.cnbl ...
- Web Service和WCF的区别。其实二者不属于一个范畴!!!
Web Service和WCF的区别 [1]Web Service:严格来说是行业标准,也就是Web Service 规范. 它有一套完成的规范体系标准,而且在持续不断的更新完善中. 它使用XML扩展 ...
- WCF与WebService的区别
1.WebService:严格来说是行业标准,不是技术,使用XML扩展标记语言来表示数据(这个是夸语言和平台的关键).微软的Web服务实现称为ASP.NET Web Service.它使用Soap简单 ...
- 三十一、【WCF路由中间件】WCFHosting服务主机的路由器与负载均衡和实现思路
回<[开源]EFW框架系列文章索引> EFW框架源代码下载V1.3:http://pan.baidu.com/s/1c0dADO0 EFW框架实例源代码下载:http://pan.baid ...
- Web Service和WCF的到底有什么区别
[1]Web Service:严格来说是行业标准,也就是Web Service 规范,也称作WS-*规范,既不是框架,也不是技术. 它有一套完成的规范体系标准,而且在持续不断的更新完善中. 它使用XM ...
- Web Service 和WCF的比较
Web Service 的工作原理 Web Service也叫XML Web Service WebService是一种可以接收从Internet或者Intranet上的其它系统中传递过来的请求,轻量 ...
随机推荐
- Python学习日志(一)
Python的安装 访问http://www.python.org 点击downloads,选择Windows 我在这里选择了Latest Python 3 Release - Python 3.5. ...
- LeetCode 412. Fizz Buzz
Problem: Write a program that outputs the string representation of numbers from 1 to n. But for mult ...
- 【算法杂谈】Miller-Rabin素性测试算法
额,我们今天来讲一讲Miller-Rabin素性测试算法. 读者:怎么又是随机算法!!!(⊙o⊙)… [好了,言归正传] [费马小定理] 费马小定理只是个必要条件,符合费马小定理而非素数的数叫做Car ...
- 餐厅点餐系统app总结
总结: 三个冲刺已经结束,虽然没有说十分完美,但该实现的功能还是实现了,只是在市场是相较于专业性的缺乏竞争力,从界面到体验都需进一步优化. 每个人的进度不一样,为了同一个任务需要不断的磨合与合作,但慢 ...
- CompiledEffect Direct3D9 Sample fxc.exe
- log4j使用--http://www.cnblogs.com/eflylab/archive/2007/01/11/618001.html
package log4jTest.com; import java.io.FileReader; import org.apache.log4j.BasicConfigurator; import ...
- Php:学习笔记(一):版本选择
(注:本文来自网络) 超过75%的网站使用了PHP作为开发语言,wordpress,phpmyadmin和其他一些开源项目的盛行,带来了一大批的长尾用户.然而,他们一般安装之后却很少升级.下图是目前P ...
- iOS. PercentEscape是错用的URLEncode,看看AFN和Facebook吧
别再使用stringByAddingPercentEscapesUsingEncoding 当遇到发送网络请求的参数中有汉字的情况,很多人一股脑地使用stringByAddingPercentEsca ...
- spark - tasks is bigger than spark.driver.maxResultSize
Error ERROR TaskSetManager: Total size of serialized results of 8113 tasks (1131.0 MB) is bigger tha ...
- CF2.C
C. Vladik and fractions time limit per test 1 second memory limit per test 256 megabytes input stand ...