maxBufferSize="65536" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8"> </binding> </basicHttpBinding> </bindings> </system.serviceModel> |
<리스트 4> Configuration 설정
Custom Binding
그럼 Custom Binding의 예제를 살펴보도록 하겠다. Custom Binding을 구현하기 위해서는 분산 통신에 대한 완벽한 이해가 있어야 할 뿐만 아니라 통신의 각 요소들을 직접 구현해야 하므로 분산 기술에 대한 깊은 이해가 있어야 한다. 다음 Configuration은 Custom Binding을 구현하는 설정의 예제이다.
<system.serviceModel> <services> <service name="MyService"> <endpoint contract="IMyService" binding="customBinding" bindingConfiguration="Binding1" /> </service> </services> <bindings> <customBinding> <binding name="Binding1"> <reliableSession acknowledgementInterval="00:00:00.2000000" maxTransferWindowSize="32" inactivityTimeout="00:10:00" maxPendingChannels="128" maxRetryCount="8" ordered="true" /> <security authenticationMode="SecureConversation" requireSecurityContextCancellation="true"> </security> <textMessageEncoding messageVersion="Soap12WSAddressing10" writeEncoding="utf-8" /> <httpTransport authenticationScheme="Anonymous" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" proxyAuthenticationScheme="Anonymous" realm="" useDefaultWebProxy="true" /> </binding> </customBinding> </bindings> </system.serviceModel> |
<리스트 5> Custom Binding Configuration 설정
Address(Where?)
Address는 서비스를 제공하는 주소이다. Address는 URI(Uniform Resource Identifier)의 형태로 구현된다. URI는 전 세계적으로 유니크한 서비스 주소가 되기 때문에 서비스를 구현하기에 적합한 모델이 된다. 다음 URI의 예를 살펴보자. - http://HoonsServer:1577/TestServer
- net.tcp://211.32.23.1:4343/yeah
- net.pipe://Server:2007/WcfTest