WCF hosted in windows service + webpage?

I'm not sure I'm going to ask a moot point, but here it goes. I have a WCF service hosted on a Windows service and a new requirement has emerged: the keepalive webpage needed to balance the load. Is it possible to host this page from my windows service?

Do I need to resort to hosting WCF in IIS? I would rather not do this.

Thank.

+3
source share
3 answers

Try creating a service contract to handle loadbalancer requests opened with basicHttpBinding

+2
source

Windows HTTP basicHttpBinding wsHttpBinding. IIS . HTTP IIS , .

IIS , , 80 HTTP- Windows, IIS 80, .

+1

More than a year later, I hope this helps

http://msdn.microsoft.com/en-us/library/bb412178.aspx

How to create a basic WCF web HTTP service

Look at the contract:

[ServiceContract]
public interface IService
{
    [OperationContract]
    [WebGet]
    string EchoWithGet(string s);

    [OperationContract]
    [WebInvoke]
    string EchoWithPost(string s);
}

you have a request (or post request) in the 's' parameter, and you should write the output html in reverse. What all

+1
source

Source: https://habr.com/ru/post/1792483/


All Articles