I've tried this on two machines and can't figure it out. I've followed the instructions here (http://msdn.microsoft.com/en-us/library/ms731053.aspx) and ensured that the TCP listener service开发者_如何学JAVA is running. However, next to the site application, I see "Unknown (net.tcp)" as the status.
For enabled protocols in IIS, they are listed as "http,net.tcp". My binding for net.tcp is "808:*" and the app pool is .NET 4.0 integrated. Let me know what information I can provide.
Also, when trying to connect, it says it cannot connect to the mex endpoint. My service endpoint code is below. Any help is appreciated. Thanks.
<system.serviceModel>
<services>
<service name="Sandbox.ClientSideWCF.Service">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:808/service.svc" />
</baseAddresses>
</host>
<endpoint name="TcpEndpoint" address="" contract="Sandbox.ClientSideWCF.IService" binding="netTcpBinding" />
<endpoint name="MetaInfo" contract="IMetadataExchange" binding="netTcpBinding" address="mex" />
</service>
</services>
....
</system.ServiceModel>
The < baseAddresses > element is for self-hosted services. See here:
http://msdn.microsoft.com/en-us/library/ms788995.aspx
Try removing it. Also see this link How to: Host a WCF Service in WAS:
http://msdn.microsoft.com/en-us/library/ms733109.aspx
I think I figured it out. The problem was that I didn't include a service behavior. I added an empty behavior and it worked. I didn't know this was required.
精彩评论