views:

25

answers:

0

Hi, I've been asked to write a windows service which will respond to WEBGET. I'm new to this. Can someone tell me if this is even possible. I originally wrote the service as a webservice and it worked fine.

The contract I have is:

[ServiceContract(Namespace="http://Microsoft.Samples.WindowsService")]
public interface IService
{
   [OperationContract(Name = "Result")]
   [WebGet(UriTemplate = "/")]
   string Result();
}

When I had this set up as a webservice when I went to the default webpage I would get a page with an xml tag with the string inside it.

However now I've changed this to a windows service I'm getting the standard default which tells you that you've created the service and how to test it.

Can anybody suggest how I would get this to work for WEBGET for a Windows Service?

Currently I'm trying to host the WCF service in a windows service.

Thanks!