WCF学习之旅(一)---Hello World.
2008-11-21 22:46
417 查看
WCF学习之旅(一)---Hello World.
看了一些关于WCF的资料,从实例入手。记录自己学习WCF的过程。
从最简单的Hello World入门。
下图是我的solution及项目。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IHello" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8089/Hello/Hello"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IHello"
contract="IHello" name="BasicHttpBinding_IHello" />
</client>
</system.serviceModel>
</configuration>
编译通过及配置好IIS后先运行host再运行Client.这时可以看到host程序中会出现hello,I’m XXX.
代码下载
看了一些关于WCF的资料,从实例入手。记录自己学习WCF的过程。
从最简单的Hello World入门。
下图是我的solution及项目。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IHello" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8089/Hello/Hello"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IHello"
contract="IHello" name="BasicHttpBinding_IHello" />
</client>
</system.serviceModel>
</configuration>
编译通过及配置好IIS后先运行host再运行Client.这时可以看到host程序中会出现hello,I’m XXX.
代码下载
相关文章推荐
- RabbitMQ 学习笔记(一):简单介绍及"Hello World"
- 安卓入门学习之Hello,world!
- JFinal 3.3 入门学习 -- Hello JFinal World.
- Netty学习(二)-Helloworld Netty
- libevent代码阅读(3)——入门例子“hello-world.c”的学习
- 为什么学习众多编程语言的第一个程序都是 hello, world
- python3学习笔记--001--python HelloWorld
- 【Hello,world 】如果你说“我要先学习一下再开始做”那么你永远不会真正开始。
- [Egret学习笔记 一]Egret HelloWorld!!!
- 学习摘录1--Hello, World!
- RabbitMQ学习(2) --RabbitMQ HelloWorld(Python)
- Linux设备驱动程序学习(0)-Hello, world!模块
- 开始学习windows api了,写个hello,world纪念一下
- django 学习之hello world
- Maven HelloWorld 项目学习
- <hello world>shell学习之路(一 )
- 安卓ApiDemos学习 app/Activity/HelloWorld
- Android学习-HelloWorldAndroid
- Objective C的学习之HelloWorld
- 学习as语法at&amp;t汇编格式--hello,world