This project is read-only.

ServiceBehavior is valid yet?

Topics: Web Api
Oct 11, 2011 at 10:18 AM


I'm using the preview 5, I have a question about setting ServiceBehavior attributes.  Are valids?

I found some in HttpConfiguration but can not find InstanceContextMode , can i use the attributes of ServiceBehavior?

Oct 11, 2011 at 3:40 PM
Yes, you can use service behavior. May I ask what instancing mode you are interested in?

Sent from my Windows Phone

From: trydente
Sent: 10/11/2011 2:25
To: Henrik Frystyk Nielsen
Subject: ServiceBehavior is valid yet? [wcf:275417]

From: trydente


I'm using the preview 5, I have a question about setting ServiceBehavior attributes. Are valids?

I found some in HttpConfiguration but can not find InstanceContextMode , can i use the attributes of ServiceBehavior?

Oct 11, 2011 at 4:34 PM

PerCall with ConcurrencyMode.Multiple, why?

Oct 11, 2011 at 11:55 PM

That makes sense. No other reason than if this is common (which I suspect it is) we may want to expose it as a config item (I am not guaranteeing anything – just thinking loud :)



From: trydente [email removed]
Sent: Tuesday, October 11, 2011 8:35 AM
To: Henrik Frystyk Nielsen
Subject: Re: ServiceBehavior is valid yet? [wcf:275417]

From: trydente

PerCall with ConcurrencyMode.Multiple, why?

Oct 12, 2011 at 12:26 AM

I think PerCall is the default instance context mode that WCF creates and so you need not explicitly set it using behavior attribute and also I think ConcurrencyMode values do not apply when you use PerCall, as you would be already creating one new instance for every call...

Snippet from MSDN doc:

The use of concurrency is related to the instancing mode. In PerCall instancing, concurrency is not relevant, because each message is processed by a new InstanceContext and, therefore, never more than one thread is active in the InstanceContext.


Kiran Challa

Oct 14, 2011 at 8:41 AM

Thanks for the replies.