Hey,
I am attempting to get the WCF Rest Service Template 40 (CS) which is an online template in VS 2010 to deploy to IIS 7.5 on Win Server 2008 R2. We havn't changed the template at all and are trying to get this call to work:
public class Service1
{
// TODO: Implement the collection resource that will contain the SampleItem instances
[WebGet(UriTemplate = "")]
public List<SampleItem> GetCollection()
{
// TODO: Replace the current implementation to return a collection of SampleItem instances
return new List<SampleItem>() { new SampleItem() { Id = 1, StringValue = "Hello" } };
} ....
We've tried:
- manually creating an .svc file as this template doesn't have one. looks like:
<%@ServiceHost language=c# Debug="true" Service="WcfRestService2.Service1"%>
- publishing as a website and adding it as a website in IIS.
- we've installed .net framework 4.0 on IIS and that is working.
- adding some webconfig stuff to attempt to get the endpoints from the Global.asax.
- a bunch of other stuff...
I am pulling my hair out over this and sorry I can't be more specific about what exactly is going on. The problem we are getting is the service calls such as http://localhost/Service1 can't be found thru IIS but they work fine in VS.
Here is the webservice file:
how do you insert xml? http://www.nitricburnstudios.com/Web.config