none
How to host wcf server on application ? RRS feed

  • Question

  • I know how to make wcf service server to run on iis. 
    But i need to host my wcf server on something like iis but the service will be available only when my application is up and running. 

    I know that it is possible to create application that will act like a wcf host.
    But in this case i will not have the access from other machine ( right ? ) to this service because as far as i know .. the access to this service from other machine can be done only when the wcf service is running from iis.

    Any help please ...
    10x
    Sunday, August 16, 2015 3:49 AM

Answers

  • Thanks,

    1. But in windows forms host => there will be also wsdl to the application access like i had in the iis case ?

    2. The access to the host from the client side will be the same web service like from the iis ? 


    No, go do the tutorial I provided to you, and you should find other self hosting tutorials using Bing and Google. A wsdl is for Web based solutions hosted on a Web server. A self hosting WCF service doesn't use a Web server, and a self hosting WCF service can be contacted over the Internet or Intranet due to its ability to implement a TCP/IP protocol. 
    Sunday, August 16, 2015 7:45 AM

All replies

  • I know that it is possible to create application that will act like a wcf host.
    But in this case i will not have the access from other machine ( right ? ) to this service because as far as i know .. the access to this service from other machine can be done only when the wcf service is running from iis.

    No that is not correct. Any client/service application with a service listening on a TCP or UDP port on a computer can have a client application running on a client computer that can be in contract with the computer that is hosting the service. And it can be done without IIS being involved.

    http://www.c-sharpcorner.com/UploadFile/225740/self-hosting-of-wcf-service-with-console-application/

    http://www.codeproject.com/Articles/515253/Service-Oriented-Architecture-and-WCF

    You can have self hosting WCF service that is an exe file type.

    The WCF service can be hosted by Windows service, Console Application, a Windows forms based exe with the project's ability not to use any forms by removing the form logic out if the project and by IIS.

     

    Sunday, August 16, 2015 4:56 AM
  • Thanks,

    1. But in windows forms host => there will be also wsdl to the application access like i had in the iis case ?

    2. The access to the host from the client side will be the same web service like from the iis ? 

    Sunday, August 16, 2015 5:04 AM
  • Thanks,

    1. But in windows forms host => there will be also wsdl to the application access like i had in the iis case ?

    2. The access to the host from the client side will be the same web service like from the iis ? 


    No, go do the tutorial I provided to you, and you should find other self hosting tutorials using Bing and Google. A wsdl is for Web based solutions hosted on a Web server. A self hosting WCF service doesn't use a Web server, and a self hosting WCF service can be contacted over the Internet or Intranet due to its ability to implement a TCP/IP protocol. 
    Sunday, August 16, 2015 7:45 AM