views:

23

answers:

1

hi,

i am using silverlight 4 and wcf basic http binding service . i have implemented my own custom authenticatoin ticketing system which also implements sliding expiration i.e if token in x seconds old , it rejects the calls.for that to function properly each operation call needs the token and each sucessful call shall recieve a new token which shall be used in subsequent calls.

what i want is ,

  1. how do i pass the token from the wcf to the silverlight app ? is there something like httpcontext.current.response....? yes , my servcie AspNetCompatibilityRequirementsMode.Required is set. and how do i collect the new token in my operationcompleted event?

thanks Jamal.

P.S

since my custom authentication also implements sliding expiration , thus , for each operation completion on the wcf service i must send a new token .

A: 

Your need to look at IDispatchMessageInspector which could add the header (i.e. your custom token). This is a behaviour extension you can add. Just google it.

http://msdn.microsoft.com/en-us/library/system.servicemodel.dispatcher.idispatchmessageinspector.beforesendreply.aspx

Jon