Hi Guys,
I'm getting an error in my WebClient solution, while accessing the wcf service (which is running perfectly)
My wcf service config file looks like:-
<pre><configuration>
<system.serviceModel>
<services>
<service name="HelloService.HelloService" behaviorConfiguration="mexBehavior">
<endpoint address="HelloService" binding="basicHttpBinding" contract="HelloService.IHelloService">
</endpoint>
<endpoint address="HelloService" binding="netTcpBinding" contract="HelloService.IHelloService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/HelloService"/>
<add baseAddress="net.tcp://localhost:8090/HelloService"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="mexBehavior">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
and in my webclients solution inside web.config file looks like:-
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IHelloService" />
</basicHttpBinding>
<netTcpBinding>
<binding name="NetTcpBinding_IHelloService" />
</netTcpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8080/HelloService" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IHelloService" contract="HelloService.IHelloService"
name="BasicHttpBinding_IHelloService" />
<endpoint address="net.tcp://localhost:8090/HelloService" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IHelloService" contract="HelloService.IHelloService"
name="NetTcpBinding_IHelloService">
<identity>
<userPrincipalName value="Xyz-PC\Xyz" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
I don't figure it out, where I'm doing wrong. But my wcf service is calling perfectly. And also I open the link "http://localhost:8080/HelloService" shows me the service. But unable to find out why the Client solution shows no endpoint listening error.
The way I'm calling the endpoint in my WebForm1.aspx.cs file inside client solution be looks like:-
protected void Button1_Click(object sender, EventArgs e)
{
HelloService.HelloServiceClient client = new HelloService.HelloServiceClient("BasicHttpBinding_IHelloService");
Label1.Text = client.GetMessage(TextBox1.Text);
}
Any help is greatly appreciable.
If any doubt, feel free to ask me
Thanks
What I have tried:
Create the service which is working fine as I'm testing on the console app.
Calling that service inside web client solution particularly ASP.NET empty web Application. throws me the error.
Google a lot but not figure out the particular reason