IIS/WAS vs. Self-Hosting (console app,windows form, windows service)
Self-hosted endpoints are directly configured
IIS/WAS(Windows Process Activation Service) endpoints are relative to .svc file
IIS/WAS Extended features
Service activation
ServiceHost EventsHealth monitoring and recycling
Management tools
Opening,Opened
Closing,Closed
Faulted,UnknownMessageReceived
e.g:
host.Faulted+=new EventHandler(OnFaulted));//OnFaulted: method
Service Behaviors (how are request been processed)host.Open();
debug (e.g.: including exception handling)
authentication & authorization
throtolling
IIS vs. WAS
IIS and WAS provide automatic activation. As soon as a message arrives, the service is activated.
IIS and WAS will monitor services. They will shut down a service’s process if it is idle or unresponsive. The next time a client calls the service, the process is recycled and restarted. IIS and WAS also provide health monitoring tools.
If you host a service using IIS, clients can communicate with it only using HTTP. If you host the service using WAS, clients can communicate using HTTP, TCP, named pipes and Microsoft Message Queueing (MSMQ).