WCF MessageInspectors in Compact Framework 3.5

  • Thread starter Thread starter Vincent Wolf
  • Start date Start date
V

Vincent Wolf

Hi,

I am working on a WCF project in which a self hosted WCF Service(.Net 3.5) sitting on a desktop serves the required data to a windows mobile 6.1 client with CF 3.5. Ideally each call to the service would involve authenticating the user with username and password (from database). Currently I have to pass in encrypted token obtained from the server (after validating the username and password from the Login method) as parameters for each call to the service.
The service validates the token and then gives the response.

Instead of adding the token as parameter, i would like to add it as custom message header , by using IClientMessageInspectors which automatically intercepts all calls before sending to service and appends the security message header and simillarly on the server side IDispatchMessageInspector to read the header to validate the token.

This is absolutely possible in .Net framework but I am having difficulties because of the limitations of CF 3.5 w.r.t. WCF.

Has anyone come across this situation or can anyone please help me by sharing their knowledge on how to overcome this problem?

More Info:

1. Self hosted WCF Service (.Net 3.5) running on Vista 64 bit

2. BasicHttpBinding since the mobile client only supports this binding apart from custom ws binding... and to keep things simple

3. client on VS 2008 Emulator (windows Mobile 6.1 Classic) ofcourse CF 3.5


Any help on this would be highly appreciated.






EggHeadCafe - Software Developer Portal of Choice
WPF And The Model View View Model Pattern
http://www.eggheadcafe.com/tutorial...b-7374d3da3425/wpf-and-the-model-view-vi.aspx
 
Seriously; any one...???



Vincent Wolf wrote:

WCF MessageInspectors in Compact Framework 3.5
23-Sep-09

Hi,

I am working on a WCF project in which a self hosted WCF Service(.Net 3.5) sitting on a desktop serves the required data to a windows mobile 6.1 client with CF 3.5. Ideally each call to the service would involve authenticating the user with username and password (from database). Currently I have to pass in encrypted token obtained from the server (after validating the username and password from the Login method) as parameters for each call to the service.
The service validates the token and then gives the response.

Instead of adding the token as parameter, i would like to add it as custom message header , by using IClientMessageInspectors which automatically intercepts all calls before sending to service and appends the security message header and simillarly on the server side IDispatchMessageInspector to read the header to validate the token.

This is absolutely possible in .Net framework but I am having difficulties because of the limitations of CF 3.5 w.r.t. WCF.

Has anyone come across this situation or can anyone please help me by sharing their knowledge on how to overcome this problem?

More Info:

1. Self hosted WCF Service (.Net 3.5) running on Vista 64 bit

2. BasicHttpBinding since the mobile client only supports this binding apart from custom ws binding... and to keep things simple

3. client on VS 2008 Emulator (windows Mobile 6.1 Classic) ofcourse CF 3.5


Any help on this would be highly appreciated.

EggHeadCafe - Software Developer Portal of Choice
WPF DataGrid Custom Paging and Sorting
http://www.eggheadcafe.com/tutorial...f-32b2d802ae17/wpf-datagrid-custom-pagin.aspx
 
Custom headers are not supported on the CF. The closest thing would be to
call your endpoint restfully and add a custom HTTP header yourself. Deonding
on the complexity of your data contract - this is really easy.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

in message news:[email protected]...
 
Back
Top