views:

404

answers:

1

Hello all... I'm trying to secure a data service used by my Silverlight, and am looking at using a custom SOAP header obfuscated into the SL and HTTPSed.

I've found any number of examples showing how to do this using IClientMessageInspector, IEndpointBehavior, and a few other things. Okay... it all looks straightforward enough.

My problem is though when i try to write my class, and inherit from IClientMessageInspector, it keeps telling me that the interface is not defined. I looked it up in Object Explorer, and it says it's in the System.ServiceModel.Dispatcher namespace. Okay.

I cannot for the life of me get this interface to be "referenced" though. I've added a project reference to System.ServiceModel, and i have the following imports in my code file (all of which are indicated to be okay):

Imports System.ServiceModel
Imports System.ServiceModel.Description
Imports System.ServiceModel.Channels
Imports System.ServiceModel.Dispatcher

Yet when i try to Implement IClientMessageInspector, it still tells me it's undefined, and offers to replace it with IClientMessageFormatter or IClientOperationSelector.

What references/imports do i need to add to get IClientMessageInspector???

+2  A: 

Found the problem. The System.ServiceModel.dll referenced in the project is against the runtime v2.0.50727, which does not include the newer interfaces and such, instead of the framework v.3.x version of the dll.

But... now this presents a new problem, which will become it's own question.

eidylon
By-the-by, check out this post for how to do this in Silverlight... http://blogs.msdn.com/silverlightws/archive/2008/10/20/new-web-services-features-in-sl2-rtw.aspx
eidylon