none
Cannot Access WIndows Hosted WCF Service in Local IIS hosted Website But Works in IIS Express RRS feed

  • Question

  • I hosted a wcf service as console application in my pc .when I try to access this service to a website hosted in IIS Express I can access this service(when I run through visual studio) .But when i host this website in Local IIS Server this service is not accessible.I tried same after deactivating firewall but not working 
    Tuesday, January 31, 2017 12:49 PM

All replies

  • Hi Basim,

    Could you share us how did you create your service and how you host it in IIS? What error did you get? It would be much helpful if you could share us more information about your issue.

    I suggest you refer the link below for hosting WCF in IIS, and check whether you miss any step.

    #How to: Host a WCF Service in IIS

    https://msdn.microsoft.com/en-us/library/ms733766(v=vs.110).aspx

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 2, 2017 4:37 AM
  • I used console application to host wcf services instead of IIS hosting.Used net.tcp binding in port 8009 .

    I published ,and Installed this console application on my pc .

    this services accessing in an asp.net MVC website(Client) .

    If I open visual studio and run this website in IIS Express through some port like 1024 .This website can access my wcf services I hosted in windows .(Works Fine)

    But If I host my website in Local IIS Server in windows ,Then website cannot access my WCF Services I Installed on my PC

    First I thought it was a Firewall blocking so I turned off my firewall and tried again but it doesn't work

    Then I Installed in my amazon EC2 instance(Windows Server 2016),but same issue happening

    The Problem is not in website or services because these work fine when i use IIS Express.

    The problem is service not reaching to website when hosting in Local IIS Server.

     





    • Edited by Basim Eld Thursday, February 2, 2017 5:49 AM
    Thursday, February 2, 2017 5:35 AM
  • Hi Basim,

    What error did you get? I made a test with hosting a WCF Service in IIS by Net.tcp, and access it from a web application which is hosted in IIS, it works correctly.

    I suggest you host your WCF in IIS to check whether this issue still exist.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 2, 2017 7:42 AM