If you’re debugging Web service and you want to see what exactly reaching the service then you may need a network packet analyzer. In this article, you will see how to use Wireshark to inspect the incoming SOAP requests.
Wireshark is a network packet analyzer. It allows you to see the bits and bytes flowing through a network in human readable form. Without it, understanding a network communication exchange would be practically impossible.
At times, you may want to work with SOAP based web services, there are few tools available including WCF Test Client, Fiddler and SoapUI. In this post, I am going to see how do you use Fiddler to Compose HTTP SOAP Requests.
In my last post, I have explained “Hosting Windows Workflow as a WCF service in IIS” and I would strongly recommend reading it before you continuing further as the same service is used.
In web service, we can host the service only in IIS, but WCF provides the user to host the service in any application (e.g. console application, Windows form etc.). Very interestingly developer is responsible for providing and managing the life cycle of the host process. Now let’s us create the WCF service which is hosted in Console application
ServiceHost basically provides you everything you need to host a WCF service.
Your service implementation is just a .NET class – you need to have a runtime environment for it, so it can be executed somehow. That’s what the ServiceHost is for – it will load your service class, set up the endpoints and channel listeners and all that stuff, and thus give your service class an “ecosystem” to live and operate in.
Service host factory is the mechanism by which we can create the instances of service host dynamically as the request comes in.
When you host a WCF service on IIS, a ServiceHostFactory is mandatory, although the default implementation will be used if you don’t explicitly define an alternative. If you host the service manually, a ServiceHostFactory may still be useful but is not required because you can create the appropriate ServiceHost directly in code.