Click here to Skip to main content
13,046,474 members (71,343 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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 13-Feb-13 23:47pm
Updated 15-Feb-13 17: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
Web02 | 2.8.170713.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2017
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