Does anyone can tell me what would be the behavior of a webservice configured per call with an static constructor? Does it is going to create a a new instance with each call or is it going to behave as a singleton instance?
If the WCF service is configured a per call instance mode a new instance will created for each call. The static constructor will be called before the first instance is created.
Please 'Mark as Answer' if this post helped you.
Marked as answer by peter pi - msft on Apr 20, 2012 01:03 AM
remixcr
0 Points
9 Posts
WCF service with static constructor and per call configuration
Apr 13, 2012 08:22 PM|LINK
Hi all,
Does anyone can tell me what would be the behavior of a webservice configured per call with an static constructor? Does it is going to create a a new instance with each call or is it going to behave as a singleton instance?
Thanks in advance.
WCF
mm10
Contributor
6409 Points
1184 Posts
Re: WCF service with static constructor and per call configuration
Apr 14, 2012 11:46 AM|LINK
If the WCF service is configured a per call instance mode a new instance will created for each call. The static constructor will be called before the first instance is created.