What should you do next?

Windows Communication Foundation (WCF) service will be hosted in Microsoft Internet Information Services (IIS).
You create a new application in IIS to host this service and copy the service DLL to the bin directory of the application.
You need to complete the deployment of this service to IIS. What should you do next?

Windows Communication Foundation (WCF) service will be hosted in Microsoft Internet Information Services (IIS).
You create a new application in IIS to host this service and copy the service DLL to the bin directory of the application.
You need to complete the deployment of this service to IIS. What should you do next?

A.
Create an asmx file and add a @ServiceHost directive to this file.
Copy the file to the root of the application directory.

B.
Create an .asmx file and add a @Register directive to this file.
Copy the file to the bin directoyy of the application.

C.
Create a svc file and add a @ServiceHost directive to this file.
Copy the file to the root of the application directory.

D.
Create a .svc file and add a @Register directive to this file.
Copy the file to the bin directory of the application.

Explanation:
How to: Host a WCF Service in IIS
(http://msdn.microsoft.com/en-us/library/ms733766.aspx)

“bin” deploy (preferred option)
1. compile your WCF service into a DLL (class library)
2. create a website in IIS6
3. copy the WCF DLL’s into the website’s .\bin folder
4. create a *.svc file in that website
5. add an appropriate web.config in the website folder to define your endpoints and service configuration etc.

Your WCF service will now be reachable at the website’s base address, plus the name of the *.svc file, e.g.
http://myserver/someweb/Myservice.svc

Your *.svc would look something like this:
<%@ ServiceHost Language=”C#” Debug=”true” Service=”WCF_Simple_Service.HelloIndigoService” %>
The Service= attributes denotes the class implementing the service – fully qualified with its namespace.



Leave a Reply 1

Your email address will not be published. Required fields are marked *