WCF Notes4(Host)

来源:互联网 发布:python高级编程 pdf 编辑:程序博客网 时间:2024/06/05 20:35
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
Health monitoring and recycling

Management tools

ServiceHost Events
Opening,Opened
Closing,Closed
Faulted,UnknownMessageReceived
e.g:
host.Faulted+=new EventHandler(OnFaulted));//OnFaulted: method

host.Open();

Service Behaviors (how are request been processed)
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).





原创粉丝点击