I created a WCF service, which has a single endpoint and uses BasicHttpBinding, so it can be accessed by mobile clients. The service(for now) does not use security. I want to create an authentication mechanisem with CustomHeader-s. The client(a windows mobile device) calls a register method and adds a custom header with user credentials to the message. The service validates supplied credentials and returns a GUID - again in the CustomHeader. The problem is that I dot't know how to access the header on the client side. I tried to get header in the
|
method, where I make a call to the following method.
|
The problem is in the following line
|
where I get an InvalidCastException.
Does anybody knows what am I doing wrong? Any ideas will be appreciated.
Uros BregarPosted Mar 5, 2010, 10:28 AM
Amit ChoudharyPosted Mar 5, 2010, 8:10 AM
Try this,
Please mark the answer if it helps you.