none
WHEN WCF SERVICE STARTED ??? RRS feed

  • Question

  • I have 2 subprojects in a projcet , the main projectName is MainProject

    Inside i have 1. subProject Named as SubPorject1, which is web application project.
    2. Wcf service project named as WcfServiceSubProject.

    Now i am accessing the wcf services on my web application and calling some wcf service funtion like getdetails().

    When i start runing my web project it is accessing the getdetails() method of service peoject, but still I have not hosted my service and still its accessing my service from   

    http://localhost:64112/getdetailsServiceProvider.svc ,

    So My question is where this service is hosted ????? and how it hosted automatically???


    • Edited by kamal165 Friday, June 5, 2015 9:50 AM
    Friday, June 5, 2015 9:50 AM

Answers

  • You have several options for hosting your WCF service (Hosting and Consuming WCF Services) depending on how you want to architect your solution.  The easiest way is probably to host through IIS, but there is also hosting in a Windows Service or in Azure.  If you are just asking about debugging your main application, make sure your project is set up for multiple startup projects using the property pages in the solution.  Also, make sure that your WCF project starts before your main application.  

    During debugging, the WCF project will be hosted in the WCF Service Host, which provides you with a WCF Test Client to test out your code if that is the only project running.

    Hope that helps!


    Christine A. Piffat

    Friday, June 5, 2015 2:59 PM
  • >>So My question is where this service is hosted ????? and how it hosted automatically???

    In IIS. The runtime automatically adds one or more default endpoints making the service usable without any configuration. Please refer to the following pagess for more information:
    http://www.codeproject.com/Articles/758926/Default-endpoints-and-default-protocol-mapping-in
    http://www.codemag.com/Article/1006061

    The WCF activation logic will create the ServiceHost instance behind the scene and configure the service with default HTTP endpoint(s).

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    Friday, June 5, 2015 3:39 PM

All replies

  • You have several options for hosting your WCF service (Hosting and Consuming WCF Services) depending on how you want to architect your solution.  The easiest way is probably to host through IIS, but there is also hosting in a Windows Service or in Azure.  If you are just asking about debugging your main application, make sure your project is set up for multiple startup projects using the property pages in the solution.  Also, make sure that your WCF project starts before your main application.  

    During debugging, the WCF project will be hosted in the WCF Service Host, which provides you with a WCF Test Client to test out your code if that is the only project running.

    Hope that helps!


    Christine A. Piffat

    Friday, June 5, 2015 2:59 PM
  • >>So My question is where this service is hosted ????? and how it hosted automatically???

    In IIS. The runtime automatically adds one or more default endpoints making the service usable without any configuration. Please refer to the following pagess for more information:
    http://www.codeproject.com/Articles/758926/Default-endpoints-and-default-protocol-mapping-in
    http://www.codemag.com/Article/1006061

    The WCF activation logic will create the ServiceHost instance behind the scene and configure the service with default HTTP endpoint(s).

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    Friday, June 5, 2015 3:39 PM