Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: IIS7 WCF
Hi,
 
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
Dee_Bee3.5K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
angelvarun at 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 at 14-Feb-13 8:16am
   
Hi,
Let me see if i can help you.
 
regards
anurag
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 480
1 Maciej Los 290
2 Richard MacCutchan 225
3 BillWoodruff 185
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2014
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