[Mono-bugs] [Bug 663278] New: WCF: ServiceBehavior InstanceContextMode.PerSession not working

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jan 9 09:13:07 EST 2011



           Summary: WCF: ServiceBehavior InstanceContextMode.PerSession
                    not working
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: All
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: WCF
        AssignedTo: atsushi at ximian.com
        ReportedBy: fourmont at gmx.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=407476)
 --> (http://bugzilla.novell.com/attachment.cgi?id=407476)
nunit test for InstancceContextMode.PerSession

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.45 Safari/534.13

when setting
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
on a service, all client calls in one session should go to the same service
instance and the service instance should be disposed when the session ends.

Currently Mono creates a new service object for each method call. So for
proxy.CallService(); proxy.CallService();
the service constructor is invoked twice, Dispose() not at all. 

See http://msdn.microsoft.com/en-us/library/ms733040.aspx

Test attatched.

Reproducible: Always

Steps to Reproduce:
1. Create contract with [ServiceContract(SessionMode = SessionMode.Required)]
2. Create service with [ServiceBehavior(InstanceContextMode =
3. Count # of service constructor invokations
4. Invoke two service methods in one session. 
Actual Results:  
Constructor is invoked twice, Dispose() not at all

Expected Results:  
Constructor is invoked only once, Dispose at end of session.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list