1

I have a .NET windows service and I want the user to be able to configure it with a web UI. Is is possible to serve the web UI using the windows service and not some kind of external web server like apache or IIS? The windows service is also hosting WCF and RESTful web services if that helps.

Brian
  • 1,397
  • 9
  • 33
  • 51
  • The problem I came up with trying to host silverlight app on a web page, that was provided by WCF REST service (without web server) was the server identity. Client machine thinks it hosts web page itself so passing data from that page to server might be tricky – EvAlex Jun 06 '12 at 05:58
  • You could look at this similar question: http://stackoverflow.com/questions/4268814/embedded-c-sharp-web-server – Joe Jun 06 '12 at 11:53

1 Answers1

2

If you're willing to serve static pages you can implement this method in your RESTful WCF service;

    public Message HtmlContent()
    {
        return WebOperationContext.Current.CreateTextResponse("<h1>Hello World</h1>", "text/html");
    }
Mehmet Osmanoglu
  • 1,212
  • 15
  • 22