WCF reuse types in referenced assemblies does not reuse the ServiceContract Interface

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2010-03-22T14:49:03Z Indexed on 2010/03/22 14:51 UTC
Read the original article Hit count: 301

Filed under:
|
|

I have three seperate projects:

-MyUserControl (Needs a reference to a service implementing IMyService)

-MyService (Implements IMyService)

-MySharedInterfaces (IMyUserControl and IMyService)

-MyWebApp

The user control needs to be dynamically loaded at runtime. This implements IMyUserControl and has a property of type IMyService which will be set at runtime.

The trouble is even with the option to reuse types the WebApp isn't reusing the IMyServiceType, it always generates it again from the Service Reference. This wouldn't be an issue if I could cast it to MySharedInterfaces.IMyService (which I can't understand, since it should be exactly the same).

The user control is expecting something of type IMyService, is there anyway to either cast the WebServiceReference.IMyService back to MySharedInterface.IMyServiceReference or force the WebServiceReference to reuse the MySharedInterface.IMyServiceReference?

Thanks

© Stack Overflow or respective owner

Related posts about wcf

Related posts about wcfservice