Priklad automaticke vygenerovaneho koncoveho bodu:
<service behaviorConfiguration="WcfService.ExampleServiceBehavior"
name="WcfService.ExampleService">
<endpoint address="" binding="wsHttpBinding" contract="WcfService.IExanpleService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
A
<behavior name="WcfService.ExampleServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
Ve vysledku komunikace s timto koncovym bodem muze byt jen na zaklade bezpecnych vzkazu (message), velikost vazkazu neni moc velka atd. Tohle se da overit, kdyz spustite a napojite na tuto sluzbu WCF test klienta. Pak je to jasne videt v konfiguraci, kteru tuto testovy klient vytvori.
Ale v rade pripadu je potreba mit jine nastaveni, napriklad ulevit bezpecnost, anebo navysit omezeni velikosti atd. Pro toto staci do endpointu pridat odkaz na nasi konfigurace, napriklad:
<endpoint address="" binding="wsHttpBinding" contract="WcfService.IExampleService"
bingingConfiguration="JinaKonfiguraceWsHTTPBindingu">
A pak nastavit treba komunikace bez zabezpeceni vzkazu:
<wsHttpBinding>
<binding name=" JinaKonfiguraceWsHTTPBindingu" 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" />
</binding>
</wsHttpBinding>
Samozrejme ze tato konfigurace musi byt v app.config nebo ve web.config a uvnitr
<system.serviceModel>/<bindings>