What is "Automatic activation" in WCF? [Resolved]

Posted by Programmer123 under WCF on 11/21/2013 | Points: 10 | Views : 2836 | Status : [Member] | Replies : 4
What is "Automatic activation" in WCF? How to implement in WCF?




Responses

Posted by: Bandi on: 11/21/2013 [Member] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
Automatic activation
Automatic activation means service starts and serves the request when a message request is received, but service doesn’t need to be running in advance.
There are few scenarios in which service needs to be running in advance, For example, in case of Self-Hosting .

IIS provides automatic activation which means the service is not necessary to be running in advance.



Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Programmer123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 11/21/2013 [Member] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
IIS and WAS provide automatic activation. As soon as a message arrives, the service is activated. If you self-host a service, you must create an instance of the ServiceHost class and configure it in code.

By using the following WCF hosting methods we can achieve automatic activation..
1) Host in application domain or process provided by IIS Server.
2) Host in the Application domain and process provided by WAS (Windows Activation Service) Server.

Activation and Hosting
- Services can be hosted or executed, so that it will be available to everyone accessing from the client. WCF service can be hosted by following mechanism
IIS Internet information Service provides number of advantages if a Service uses Http as protocol. It does not require Host code to activate the service, it automatically activates service code.
- Windows Activation Service (WAS) is the new process activation mechanism that ships with IIS 7.0. In addition to HTTP based communication, WCF can also use WAS to provide message-based activation over other protocols, such as TCP and named pipes.
- Self-Hosting WCF service can be self hosted as console application, Win Forms or WPF application with graphical UI.
- Windows Service WCF can also be hosted as a Windows Service, so that it is under control of the Service Control Manager (SCM).


These links for hosting methodologies:
http://msdn.microsoft.com/en-us/library/ee939340.aspx
http://aspnetbysudheer.blogspot.in/2013/07/wcf-unleash-1.html

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Programmer123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 11/22/2013 [Member] [MVP] Silver | Points: 50

Up
0
Down

Resolved
Automatic activation in wcf:-
In WCF msmq protocol used net.msmq to send messages. Automatic Activation means that 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.

Happy Coding,
If it helps you or directs U towards the solution, MARK IT AS ANSWER

Programmer123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 11/22/2013 [Member] [MVP] Silver | Points: 50

Up
0
Down

Resolved
See the below link:-
http://www.codeproject.com/Questions/619510/WCF-net-msmq-service-auto-activation

Happy Coding,
If it helps you or directs U towards the solution, MARK IT AS ANSWER

Programmer123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response