Click here to Skip to main content
11,929,661 members (57,944 online)
Rate this:
Please Sign up or sign in to vote.
See more: IIS7 IIS WCF

I have created a WCF Rest service in framework 4.0 which returns a xml document. I viewed it in browser by right clicking the svc file in the solution, and it is fine. The URL to get the response xml on my local machine is http://localhost:50052/Service1.svc/GetDocument/

However, the client needs to access my service URL just like a web-service asmx URL. I need to host the WCF Rest service.

How do I host the WCF Rest service in IIS 7.0? How will the third party access my service.
Posted 14-Feb-13 0:47am
Edited 15-Feb-13 18:07pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

angelvarun 14-Feb-13 7:42am
Hi Anurag,

I have been through these two links while googling , anyways thanks for it.

The problem in the first link is, I am not clear what needs to be entered in the Site/Application box in the publish dialog.

In second link it is mentioned that no change is required in web.config file. I am not sure as it is not working for me. It gives me the below error:
Exception Details: System.ArgumentException: ServiceHost only supports class service types.
Anurag3487 14-Feb-13 8:16am
Let me see if i can help you.

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

The WCF REST service can be published from the site itself and directly be hosted.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100