Johan's Blog

This and that in a developer's life in general
Welcome to Blogs @ IRM Sign in | Join | Help
 Search

Disclaimer

The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.

This Blog

[WCF] Configuring the Service Client to Go Via TcpTrace

TcpTrace by Simon Fell is a great tool to trace your HTTP and SOAP calls with, until you begin using WCF and it starts complaining about you not going directly to the service, address filter mismatch and all that. It's quite easy to fix that though, just add an endpoint behavior to your client configuration and tell it your're running via TcpTrace, like this sample:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<system.serviceModel>

<bindings>

<wsHttpBinding>

<binding name="WSHttpBinding_IMyService" >

<security mode="Message">

<message clientCredentialType="Windows" />

</security>

</binding>

</wsHttpBinding>

</bindings>

   

<behaviors>

<endpointBehaviors>

<behavior name="tcpTraceBehavior">

<clientVia viaUri="http://localhost:8080/MessageSecurityWindows/Service.svc"/>

</behavior>

</endpointBehaviors>

</behaviors>

   

<client>

<endpoint address="http://localhost:1035/MessageSecurityWindows/Service.svc"

behaviorConfiguration="tcpTraceBehavior"

binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService"

contract="MessageSecurityWindowsClient.MyService.IMyService"

name="WSHttpBinding_IMyService">

</endpoint>

</client>

</system.serviceModel>

</configuration>


Cross-posted from my blog at http://weblogs.asp.net/jdanforth
Published den 8 juli 2007 00:12 by johan
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems