What is the default InstanceContextMode for a WCF service (using BasicHttpBinding) under Mono?

369 views Asked by At

After bringing my code to Mono 3.2.8, I had a surprise to see that the behavior of my service was always created like using InstanceContextMode.Single. Same on Mono 3.12.1. To be more clear, my service is not marked with any InstanceContextMode attribute and uses BasicHttpBinding.

I know from Microsoft world that default value of InstanceContextMode should be PerSession , but of course when BasicHttpBinding is used, then the value will be PerCall. This article explains well, but again, in Microsoft world.

For Mono, I tried googling, but to no avail. This link is the only thing I could find, it says only InstanceContextMode.Single is implemented, but this documentation is outdated, couldn't find any update on the matter.

And I noticed for Mono 3.12.1, after I explicitly set the InstanceContextMode.PerCall that I could get finally the wanted behavior.

Can anyone explain the defaults values of InstanceContextMode and explain real behavior in Mono? Would be nice to get some clarity because I will have to maintain the code for both windows and Linux.

0

There are 0 answers