what are the advantages of hosting WCF Services in IIS as compared to self hosting
what are the advantages of hosting WCF Services in IIS as compared to self hosting?
There are two main advantages of using IIS over self hosting:
IIS provides automatic activation that means the service is not necessary to be running in advance. When any message is received by the service it then launches and fulfills the request. But in case of self hosting the service should always be running.
If IIS finds that a service is not healthy that means if it has memory leaks etc, IIS recycles the process. Ok let us try to understand what is recycling in IIS process. For every browser instance a worker process is spawned and the request is serviced. When the browser disconnects the worker process stops and you loose all information. IIS also restarts the worker process. By default the worker process is recycled at around 120 minutes. So why does IIS recycle. By restarting the worker process it ensures any bad code or memory leak do not cause issue to the whole system.
In case of self hosting both the above features you will need to code yourself. Lot of work right!!. That's why IIS is the best option for hosting services until you are really doing something custom.
Below figure shows where the recycle option is located in IIS. You need to click on the DefaultAppool and then Properties.
2007-11-04, 5785👍, 0💬
How To Enter Characters as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics If you want to ent...
.NET INTERVIEW QUESTIONS - Where do you specify session state mode in ASP.NET ? The following code e...
How To Build WHERE Criteria with Web Form Search Fields? - MySQL FAQs - Managing Tables and Running ...
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...
How To Use Subqueries with the IN Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqu...