Continuing from my previous post, I wanted to find a way to actually “see” the traffic data as it is transported so I could confirm that SSL is indeed encrypting (as well as for some cheap thrills). I have heard that there are several tools for monitoring web traffic, so I decided to use one of them called Fiddler. Fiddler is an excellent free tool that I have known about for some time but do not have any experience with. Monitoring SSL traffic seemed like a good excuse to learn how to use Fiddler. More about that in the next post.
The first step though is to have a client and a web application that I can monitor. In my previous post I created a WCF web service but I did not have a client application to use that service. So the normal thing to do would be to create a .NET client application for the WCF service. Right?
Well, I am not normal so I decided to create another WCF service. And this service is special because it is a REST based service. REST is a very popular technology for creating web services because it allows clients and web servers to exchange data in human readable XML or JSON form. This means any web browser can display the data and I don’t have to create a separate client to show the data received from the web service. This is – like we say in India – Clever no?
I used this tutorial to create a simple REST based web service using WCF. I then modified its configuration file to look like this:
<compilation debug="true" targetFramework="4.0" />
<transport clientCredentialType="None" />
<security mode="Transport" />
<!--Unless fully qualified, address is relative to
base address supplied above-->
<!--Upon deployment, the following identity element should
be removed or replaced to reflect the identity under which
the deployed service runs. If removed, WCF will infer an
appropriate identity automatically.-->
<!-- To avoid disclosing metadata information, set the
value below to false and remove the metadata endpoint
above before deployment -->
<!-- To receive exception details in faults for debugging
purposes, set the value below to true. Set to false
before deployment to avoid disclosing exception
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
Here is the REST based sample itself. In my next post, I will talk about my experiences with Fiddler monitoring the REST based service.