Click here to Skip to main content
15,039,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm a beginner to WCF .I need a help regarding netTCPBindings of WCF Service.
I'm using the self Hosting with Console Application. Here is my aap.Config file.
XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration> 
  <system.serviceModel>   
    <services>
      <service name="HelloService.HelloService" behaviorConfiguration="mexBehaviour" >
        <endpoint address="HelloService.HelloService" binding="basicHttpBinding" contract="HelloService.IHelloService"></endpoint>
        <endpoint address="HelloService.HelloService" binding="netTcpBinding" contract="HelloService.IHelloService"></endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>
        <endpoint address="mex2" binding="mexTcpBinding" contract="IMetadataExchange"></endpoint>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8080"/>
            <add baseAddress="net.tcp://localhost:8090"/>
          </baseAddresses>
        </host>        
      </service>       
    </services>    
    <behaviors>
      <serviceBehaviors>
        <behavior name="mexBehaviour">
          <serviceMetadata httpGetEnabled="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>


When I run the service and copy this address(http://localhost:8080[^]) in IE I'm able to see the WSDL document.But I'm unable to see the wsdl document using net.tcp://localhost:8090 address .

Please let me know How can I see the wsdl document using net.tcp// in browser.

Thanks in Advance
Kabita
Posted

1 solution

Use WCF test client to test tcp protocol. http://msdn.microsoft.com/en-us/library/bb552364.aspx[^]
Using browser to test TCP, I doubt if it is possible.
   
Comments
Member 11023812 2-Sep-14 2:25am
   
Thanks for the Reply..
I want to see the metadata using net.tcp protocol.
If I'm gonna add the service using "http://localhost:8080" address,its working fine both the cases(adding service reference to any application and also woth WCFTESTClient).
But I'm curious to know whether it is possible to add the reference or see the wsdl metadata using net.tcp//localhost:8090 ..
Rajiv Gogoi 2-Sep-14 12:03pm
   
I don't think its possible because we aren't using http. we get the metadata because we enable GET in config file.
http://msdn.microsoft.com/en-us/library/ms733109.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900