locked
How to Start and Stop the WCF Services? RRS feed

  • Question

  •  

    Does any help me to Manually start and stop the WCF Services Hosted in IIs

     

    Thanks.

     

    Monday, November 5, 2007 12:31 PM

Answers

  • One reminder, the activation of WCF service in IIS is on-demand. That is the service instance will not be constructed until the first request arrives.

    A WCF service will automatically recycled (stop but not permanently) if the configuration has been changed. You may manually stop a WCF service by touching the web.config file. Note that, as I said, this stop is not a permanent one. The service will automatically start again once it receives a request. If you want to fully stop the service, you have to stop corresponding application pool in IIS or completely hide the service.svc file.   

    Tuesday, November 6, 2007 5:52 PM

All replies

  • In IIS, your service is hosted as a part of a web application. Simply start and start the web app within the IIS interface to start and stop the service.
    Monday, November 5, 2007 12:42 PM
  • how can i control the IIS Web Interface?is it enough to control the WCF Services.

     

    sasi

     

    Tuesday, November 6, 2007 5:22 AM
  • Yes, You can start/stop IIS and it will stop the services. The service activation in IIS is handled by a handler. There is no actual call to "Open", "Close", "Abort" on the ServiceHost class when a service is hosted in IIS.

     

    How can you stop/start? MMC snap-in for IIS can stop/start the web sites. Also, the "World Wide Web Publishing Service" service in the Services MMC snap-in can be stopped/started and that will effect all WCF services hosted in IIS as well.

     

     

    Tuesday, November 6, 2007 1:11 PM
  • One reminder, the activation of WCF service in IIS is on-demand. That is the service instance will not be constructed until the first request arrives.

    A WCF service will automatically recycled (stop but not permanently) if the configuration has been changed. You may manually stop a WCF service by touching the web.config file. Note that, as I said, this stop is not a permanent one. The service will automatically start again once it receives a request. If you want to fully stop the service, you have to stop corresponding application pool in IIS or completely hide the service.svc file.   

    Tuesday, November 6, 2007 5:52 PM
  • In IIS, your service is hosted as a part of a web application. Simply start and start the web app within the IIS interface to start and stop the service.

    I know it's an old post but, your answer is correct only to http endpoints. E.g. endpoints based on net.tcp protocol will be still available. To turn off web service hosted within IIS you need to stop app pool as PanWang mentioned.

    Friday, December 18, 2015 9:02 AM