I am trying to create a simple wcf service that has a net.tcp endpoint. My OS is Vista and I am hosting the service in IIS 7. I have set my default website binding for net.tcp to 9200:* and added net.Tcp to my Enabled Protocols in my website hosting the service and the default website. Here is my Config Values:
<system.serviceModel>
<services>
<service name="FirstWcfService.Serv
ice" behaviorConfiguration="Ser
viceBehavi
or">
<!-- Service Endpoints -->
<endpoint address="" binding="netTcpBinding" contract="FirstWcfService.
IService"
bindingConfiguration="tcpb
inding"/>
<endpoint address="mextcp" binding="mexTcpBinding" contract="IMetadataExchang
e"/>
<endpoint address="" binding="wsHttpBinding" contract="FirstWcfService.
IService"
/>
<endpoint address="mexhttp" binding="mexHttpBinding" contract="IMetadataExchang
e"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment to avoid
disclosing exception information -->
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFa
ults="fals
e"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="tcpbinding">
<!--<security mode="None"></security>-->
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
The wsHttp endpoint seems to work fine. When I try to add a service reference through VS2008 to net.tcp://localhost:9200/
FirstWcfSe
rviceHost/
Service.sv
c/mextcp (my net.tcp endpoint), I receive this error:
Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:9200/
FirstWcfSe
rviceHost/
Service.sv
c/mextcp'.
The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost:9200/
FirstWcfSe
rviceHost/
Service.sv
c/mextcp' is unavailable for the protocol of the address.
If the service is defined in the current solution, try building the solution and adding the service reference again.
Now if I add the service using the wshttp endpoint, it will add the net.tcp endpoint to my client app. But if I try to use the net.tcp endpoint, I get this error:
{"The message could not be dispatched because the service at the endpoint address 'net.tcp://XXXXXXXXX:9200/
FirstWcfSe
rviceHost/
Service.sv
c' is unavailable for the protocol of the address."}
Anyone have any suggestions?