I am trying to host a WCF server using windows services because the service is going to be hosted in each and every client machine. I have written the below code in the OnStart event of windows service. I have installed the windows service successfully and started the service without any problem. But when I tried to access the service endpoint using url address, application not able to reach the service. Also, when I tried to view the wsdl information using internet explorer (I have enabled the httpGetEnabled), browser returned error message to check the connectivity. When I run diagnosis, it said that the service is not accepting any request from outside. I am not sure what is wrong in the below code. Please help me.
protected override void OnStart(string[] args)
{
using(ServiceHost host = new ServiceHost(typeof(myservice)))
{
host.open();
}
}