I am getting an issue to open the WCF service in browser with localhost:8733. it says that This site can’t be reached
localhost refused to connect.
Search Google for localhost 8733 Home Search Flight ERR_CONNECTION_REFUSED
Below is the configuration file is used in the console application which is the hosting the application
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="mex1">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="HelloIndigo.HelloIndigo" behaviorConfiguration="mex1">
<endpoint address="HelloIndigo" binding="basicHttpBinding" contract="HelloIndigo.IHelloIndigo">
</endpoint>
<endpoint address="HelloIndigo" binding="netTcpBinding" contract="HelloIndigo.IHelloIndigo"></endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/" />
<add baseAddress="net.tcp://localhost:9000"/>
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
in the Host console application i am writing the below code
ServiceHost host = new ServiceHost(typeof(HelloIndigo.HelloIndigo));
host.Open();
Console.WriteLine("Host is opened at " + DateTime.Now.ToString())