Click here to Skip to main content
11,496,146 members (658 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
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
  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
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 RyanDev 230
1 Sergey Alexandrovich Kryukov 114
2 Richard Deeming 100
3 OriginalGriff 89
4 Mostafa Asaduzzaman 59
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web04 | 2.8.150520.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