Developing a WCF Service Library and Hosting it as WCF Web Service Using VS2K8 - Deploying and Hosting a WCF Service application (WCF web service)
(Page 4 of 5 )
Once the solution is built successfully, we need to deploy/host it on IIS. Let us start with creating a Virtual Directory in IIS to host our solution. Go through the following steps to create the same in the simplest manner:
- Go to the application folder (not the solution folder), right click on it and then click on "Properties" (fig 05).
- Switch to the "Security" tab and make sure that all privileges are provided for both the "ASP.NET machine account" and the "NETWORK SERVICE" accounts (fig 06).
- Switch to "Web Sharing" and click on "Share this folder" (fig 07).
- Accept the "default alias" ("WCFSampleService") as follows (fig 08) and click OK twice (to apply all the properties).

Figure 05

Figure 06

Figure 07

Figure 08
Deploying and Hosting WCF Service application (WCF web service), continued
Open IIS (Start || Administrative Tools || Internet Information Services Manager), and then open "Default Web Site." You should see the "WCFSampleService" configured as a web application.
- Right click on "WCFSampleService" and go to "Properties" (fig 09).
- Switch to the "ASP.NET" tab and select the ASP.NET version "2.0.50727" (fig 10).
- Switch to "Directory Security," click on "Edit" of "Authentication and Access control," make "Enable anonymous access" checked (fig 11) and click OK twice to apply all the properties.
- If the solution is configured, built and hosted properly, you should be able to access the web service from the URL http://localhost/WCFSampleService/EmpService.svc and the output should look like the following (fig 12).
Figure 09

Figure 10

Figure 11

Figure 12
Next: Testing the WCF Web Service: creating the WCF Client using Windows Forms >>
More ASP.NET Articles
More By Jagadish Chaterjee