开发者

silverlight custom authentication(posted this question on silverlight.net , but no response)!

开发者 https://www.devze.com 2023-01-06 12:58 出处:网络
i am using silverlight 4 and wcf basic http binding service . i have implemented my own customauthenticatoin ticketing system which also implements sliding expiration i.e if token in x seconds old , i

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 e开发者_JAVA百科ach 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 .


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

0

精彩评论

暂无评论...
验证码 换一张
取 消