0

i have hosted my WCF service in IIS and have following endpoints configured

    <endpoint name="MainService" contract="Docs.ICalculatorService" address="http://localhost:49495/WcfService1/service.svc" binding="wsHttpBinding">
            </endpoint>
    <endpoint name="MainTcpService"  contract="Docs.ICalculatorService" address="net.tcp://localhost:49496/WcfService1/service.svc" binding="netTcpBinding">
   </endpoint>

i have hosted my WCF service on port no 49495 which is real , now i have configured another endpoint which is using port no 49496 do i need to host this WCF service on another port 49496 or i am missing something

getting this error when looked in stack trace

The ChannelDispatcher at 'net.tcp://localhost:49495/WcfService1/service.svc' with contract(s) '"ICalculatorService"' is unable to open its IChannelListener

i have configured Endpoints and Configured Bindings in IIS 7 but now i am getting a new error

You have tried to create a channel to a service that does not support .Net Framing. It is possible that you are encountering an HTTP endpoint.**

Nitin Bourai
  • 430
  • 7
  • 20
  • I think we need more of your web.config. – Jeremy McGee Oct 07 '11 at 07:53
  • 2
    Have you enabled non-HTTP service activation for IIS? – anton.burger Oct 07 '11 at 08:38
  • My Configuration contains two end points and i am using IIS 7 and convigured both bindings http and net.tcp when i am using only http its working fine but when i include net.tcp, i am unable to get the meta data – Nitin Bourai Oct 07 '11 at 11:42
  • Your service's web.config is not the problem. You need to [configure IIS to activate WCF services over TCP](http://msdn.microsoft.com/en-us/library/ms731053.aspx) and other non-HTTP protocols. – anton.burger Oct 07 '11 at 16:05

1 Answers1

0

As shabulator says, you need to enable the non-http service activator. In case this isn't clear to anyone stumbling across this, this is a Windows feature you need to switch on.

On Windows 7 (Server 2008 will be similar) under Control Panel -> Programs you will see "Turn Windows features on or off". This brings up a dialog as the one shown.

Windows Features dialog

Under Microsoft .NET Framework 3.5.1 tick the two boxes to install the features.

When I did this, it had the side effect of putting .NET 3.5 onto the server, which I didn't want as I was using a later version. If this happens, open a command prompt and go to the .NET 4.0.30319 folder and run the aspnet regiis tool.

C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -iru

VictorySaber
  • 3,084
  • 1
  • 27
  • 45