This came up in the course of troubleshooting a messaging issue. Sometimes the payload of the message is not properly passed to a web service method implementation (nulls for all arguments are passed instead). In fact, the identical message can be sent,
sometimes it works, sometimes it doesn't but usually it works.
The issue can be recreated on demand, as it turns out, by restarting the Application Pool in IIS and then sending a message immediately after this. Shortly thereafter (after a failure) the message will start working reliably and then fail every so often
after that, just not very often at all. The message headers always make it through intact and show the content length > 0 on failures and successes, and the correct function is called. This using Relayed Messaging and the webHttpRelayBinding.
Whether it fails or succeeds, the correct web service method is reliably called and the response is received by the client (for failures the response is an error this web service sends back indicating arguments are null which is not valid).
Anyway, to the question at hand. We'd like to use Fiddler to capture the message and view it. We've already done this using WCF Tracing, but don't get the body as it is treated as a stream.
We think if the Connectivity Mode is set to use HTTP that Fiddler will be able to show the message.
So, how can the ConnectivityMode.Http be set in web.config, for a web service with endpoint listener directly on the Relayed service bus? And which uses the webHttpRelayBinding (this binding is needed since the client is a java client using REST APIs).
webHttpRelayBinding, as its name indicates, is using HTTP protocol. There is no need to set ConnectivityMode.Http for it. What's the problem if you use Fiddler? I think you may also use WCF Message inspector to get the Message sent from client/to
Part of the code shows how to use Message Inspector to change the message returned by service bus. This sample demonstrates how to expose local SQL Server database to internet access via webHttpRelayBinding.