WebServiceHost factory helps us to host a WCF REST Service in managed application. This class is derived from ServiceHost class and automatically enables webHttpBinding and webHttpBehavior on the service End points. In this article, I will explain
WebServiceHost factory perform following special task
- What is WebServiceHost Factory class?
- What is its function?
- Where to use it?
- One sample on hosting WCF REST Service using WebServiceHost.
- This is useful to host WCF REST End points.
- This is derived from ServiceHost.
- WebServiceHost has some extra functionality.
- WebServiceHost works exactly the same way ServiceHost works.
WebServiceHost factory perform following special task
It disables meta data
It disables WSDLIt disables end pointIt prevents meta data publishing
Autometically create End Point
It autometically creates the end point for all contracts using webHttpBindingNo need to call AddServiceEndPoint
Autometically add WebHttpBehaviour
It adds behavior to all end point adding behavior ensures URI+Verb routing will work for all incoming requests
0 comments:
Post a Comment