[Mono-bugs] [Bug 702532] New: DuplexClientBase Channel Initialization Broken

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 28 00:51:07 EDT 2011



           Summary: DuplexClientBase Channel Initialization Broken
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: x86-64
        OS/Version: openSUSE 11.4
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: WCF
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: john at crunchylogistics.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: Yes

Created an attachment (id=436994)
 --> (http://bugzilla.novell.com/attachment.cgi?id=436994)
Example Application To Reproduce

Description of Problem:

I hesitated to post this report because the problem occurs in really the -MOST-
basic usage of a duplex WCF service that I can fathom, and this has reportedly
been supported for several versions. I am entirely open to the idea that my
energy drink had some kind of hallucinogen in it.

As of Mono 2.10.2, I cannot successfully implement a duplex WCF client/server.
The client fails to initialize when attempting to create the underlying
communication channel. The error is an InvalidCastException thrown during

I have isolated this problem to DuplexClientBase<T>, as I can successfully
initialize a simplex client using ClientBase<T>, as well as manually create the
channel by calling DuplexChannelFactory<T>.CreateChannel() and bypassing the
DuplexClientBase<T> helper all together.

Steps to reproduce the problem:
I have provided a very basic example:

* A service contract (ITestContract) which defines a single addition operation,
and is associated with a callback contract (ITestCallbackContract)
* A callback contract (ITestCallbackContract) that defines a simple operation
to send a message back to the client side.
* An implementation of the server (TestServer) and the callback object

The setup is dead simple. net-tcp binding, bound to local interface on port

Actual Results:
Unhandled Exception: System.InvalidCastException: Cannot cast from source type
to destination type.
() [0x00000] in <filename unknown>:0
  at System.ServiceModel.ClientBase`1[Jgh.Test.Program+ITestContract].Open ()
[0x00000] in <filename unknown>:0
  at Jgh.Test.Program.Main (System.String[] args) [0x00000] in <filename

Expected Results:
Callback says: Adding 50 and 25 is 75!
Adding server result: 75

How often does this happen? 

This examples works out of box on .NET, but fails identically with Mono 2.10.2
on both Windows 7 x64 and OpenSUSE 11.4 x86-64. I have not tested other
platforms or other mono versions.

Additional Information:

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

More information about the mono-bugs mailing list