What is Web Hosting ? | How To Buy Web Server | Shared vs VPS vs Dedicated Linux or Windows Hosting
Hosting Buying Guide | How to select best hosting | Everything About Hosting and Servers | Hindi
Part 29 Hosting wcf service in iis
- Published on Feb 11, 2014
- Link for code samples used in the demo
Link for all dot net and sql server video tutorial playlists
In this video we will discuss, hosting wcf service in IIS. This is continuation to Part 28. Please watch Part 28, before proceeding.
To host a wcf service in IIS, create a file with .svc extension. This file contains ServiceHost directive. The Service attribute of ServiceHost directive, specifies which service this file points to. The service code can reside in
1. The .svc file
2. A separate assembly
3. A file in App_Code folder
The configuration for the wcf service goes in web.config file.
The ServiceHost directive in .svc file is responsible for creating an instance of ServiceHost when required. There is no need to write code to instantiate and start ServiceHost, as we did with self hosting.