none
Error when hosting Wcf Tcp service in IIS8 ... RRS feed

  • Question

  • Hello All,

                 I am trying to host WCF TCP service in my PC (windows 8) . I am using VS 2012 And i enabled the IIS manager And all Windows option To host TCP Service . But I getting Error when hosting in IIS .But it is Working in self hosted console Application .

     Some time i getting Error like this  when try to connect IIS host service from  WcfTestClient  :

    The URI prefix is not recognized.
    Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/WcfTcpTestApp/'.
    Could not connect to net.tcp://localhost/WcfTcpTestApp/. The connection attempt lasted for a time span of 00:00:02.0083766. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:808. 
    No connection could be made because the target machine actively refused it 127.0.0.1:808
    If the service is defined in the current solution, try building the solution and adding the service reference again.

             What is it mean "target machine actively refused it"  . i try disabling Firewall but then also not working .   Some time Get some other error 

    Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:4506/WcfTcpTestApp/'.
    Could not connect to net.tcp://localhost:4506/WcfTcpTestApp/. The connection attempt lasted for a time span of 00:00:01.9936903. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:4506. 
    No connection could be made because the target machine actively refused it 127.0.0.1:4506
    If the service is defined in the current solution, try building the solution and adding the service reference again.

    How to fix it ..

                       
    Monday, March 18, 2013 5:43 AM

Answers

  • Hello All ,

                   Sorry for this post .. That was my some configuration problem In IIS .  I am new to IIS and Web Development , so some things missed .

                  I do the things again now it is working . previously I was adding  web project under   Default Web Site , but when i add my project as main project in IIS like Default Web Site , and set the app pool to .net 4.5 and change in firewall . now it is working .

         Thank you all for your  help .

    with regards 

    jophy.

    • Marked as answer by JophyJob Monday, March 18, 2013 6:55 AM
    Monday, March 18, 2013 6:51 AM

All replies

  • IN order to run a WCF service which uses net.tcp protocol inside IIS, you have to turn on some features in IIS.

    Read this http://stackoverflow.com/questions/3188618/enabling-net-tcp


    ViBi

    Monday, March 18, 2013 6:21 AM
  • Hello ,

              I already done all these things . But also not working ....

    Monday, March 18, 2013 6:25 AM
  • Hello All ,

                   Sorry for this post .. That was my some configuration problem In IIS .  I am new to IIS and Web Development , so some things missed .

                  I do the things again now it is working . previously I was adding  web project under   Default Web Site , but when i add my project as main project in IIS like Default Web Site , and set the app pool to .net 4.5 and change in firewall . now it is working .

         Thank you all for your  help .

    with regards 

    jophy.

    • Marked as answer by JophyJob Monday, March 18, 2013 6:55 AM
    Monday, March 18, 2013 6:51 AM