none
WCF Windows Service can not work RRS feed

  • Question

  • Hi,

    I have a WCF service hosted on windows service. I am not able to consume this service from the windows forms application.
     
    1. Create a wcf library project.
     The service starts successfully and WCF Test Client opens and works nice.

    2. I add Windows Service project to host the WCF service (As mentioned everywhere on internet and also in books)

    but I can not call it from my client. What is wrong?

    Thursday, April 30, 2015 2:57 PM

Answers

  • I am not trying to be smart here, but maybe you need to find a tutoral that works that covers hosting a WCF service in a Windows service. There are a few tutorials out there if you use Bing or Google. 
    • Marked as answer by gdedshg Friday, May 8, 2015 1:24 PM
    Thursday, April 30, 2015 8:30 PM
  • Hi gdedshg,

    If your WCF Service is a http service, please first try to start your windows service, then enter the service address in the browser to see if it works, if it does not work, it seems that it has something wrong with your WCF Services, then as @DA924 said, it will be better if you can find some tutorials to see if you have done something wrong during hosting the wcf as a Windows Services, for more information, please try to refer to:
    #How to: Host a WCF Service in a Managed Windows Service:
    https://msdn.microsoft.com/en-us/library/ms733069(v=vs.110).aspx .
    #WCF Hosting with Windows Service:
    http://www.codeproject.com/Articles/653493/WCF-Hosting-with-Windows-Service .
    If the service works well in the browser, it seems that it has something wrong with your client, then please try to make sure that in the client config file it uses the same address and binding as in the service config file. 
    Besides, it will be better if you can post the error information and config file in here.

    Best Regards,
    Amy Peng




    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by gdedshg Friday, May 8, 2015 1:23 PM
    Friday, May 1, 2015 7:57 AM
    Moderator

All replies

  • I am not trying to be smart here, but maybe you need to find a tutoral that works that covers hosting a WCF service in a Windows service. There are a few tutorials out there if you use Bing or Google. 
    • Marked as answer by gdedshg Friday, May 8, 2015 1:24 PM
    Thursday, April 30, 2015 8:30 PM
  • Hi gdedshg,

    If your WCF Service is a http service, please first try to start your windows service, then enter the service address in the browser to see if it works, if it does not work, it seems that it has something wrong with your WCF Services, then as @DA924 said, it will be better if you can find some tutorials to see if you have done something wrong during hosting the wcf as a Windows Services, for more information, please try to refer to:
    #How to: Host a WCF Service in a Managed Windows Service:
    https://msdn.microsoft.com/en-us/library/ms733069(v=vs.110).aspx .
    #WCF Hosting with Windows Service:
    http://www.codeproject.com/Articles/653493/WCF-Hosting-with-Windows-Service .
    If the service works well in the browser, it seems that it has something wrong with your client, then please try to make sure that in the client config file it uses the same address and binding as in the service config file. 
    Besides, it will be better if you can post the error information and config file in here.

    Best Regards,
    Amy Peng




    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by gdedshg Friday, May 8, 2015 1:23 PM
    Friday, May 1, 2015 7:57 AM
    Moderator