Web.Config |
Top Previous Next |
In order to communicate with the TMIS server, WCF clients need to be configured to communicate with the server. This is done using standard WCF client communication configuration. For a guide to configuring WCF see the Microsoft references here:
A sample configuration is shown here: <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_ITopicMapIndexService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" > <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm=""/> <message clientCredentialType="UserName" algorithmSuite="Default"/> </security> </binding> </basicHttpBinding> <netNamedPipeBinding> <binding name="NetNamedPipeBinding_ITopicMapIndexService" > <security mode="None"> <transport protectionLevel="EncryptAndSign"/> </security> </binding> </netNamedPipeBinding> <netTcpBinding> <binding name="NetTcpBinding_ITopicMapIndexService"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> <security mode="None"> <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/> <message clientCredentialType="Windows"/> </security> </binding> </netTcpBinding> </bindings> <client> <endpoint address="http://localhost:8080/topicmapindex" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITopicMapIndexService" contract="NetworkedPlanet.EnterpriseServiceClient.TopicMapIndex.ITopicMapIndexService" name="BasicHttpBinding_ITopicMapIndexService"/> <endpoint address="net.tcp://localhost:8090/topicmapindex" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_ITopicMapIndexService" contract="NetworkedPlanet.EnterpriseServiceClient.TopicMapIndex.ITopicMapIndexService" name="NetTcpBinding_ITopicMapIndexService"/> <endpoint address="net.pipe://localhost/topicmapindex" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ITopicMapIndexService" contract="NetworkedPlanet.EnterpriseServiceClient.TopicMapIndex.ITopicMapIndexService" name="NetNamedPipeBinding_ITopicMapIndexService"/> </client> </system.serviceModel> This configuration shows three types of binding and client which you can then select from using an application setting: <add key="networkedplanet.topicmapindex.endpoint" value="BasicHttpBinding_ITopicMapIndexService"/> This application setting is read by the ASP.NET Web Parts to select a client communication method to use. |