Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
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?
✍: Guest
There are two main advantages of using IIS over self hosting:
Automatic activation
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.
Process recycling
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, 6619👍, 0💬
Popular Posts:
In below sample code if we create a object of class2 which constructor will fire first? Public Class...
How can I check for HTML errors? HTML validators check HTML documents against a formal definition of...
How do you locate the first X in a string txt? A) txt.find('X'); B) txt.locate('X'); C) txt.indexOf(...
.NET INTERVIEW QUESTIONS - What is Suspend and Resume in Threading ? It is Similar to Sleep and Inte...
In C#, what is a weak reference? Generally, when you talk about a reference to an object in .NET (an...