WCF Tutorial
Lección 88 de 236 · Part 29 Hosting wcf service in iis · Bases de datos
Part 29 Hosting wcf service in iis
Link for code samples used in the demo
http://csharp-video-tutorials.blogspot.com/2014/02/part-29-hosting-wcf-service-in-iis_11.html
Link for all dot net and sql server video tutorial playlists
http://www.youtube.com/user/kudvenkat/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.