开发者

WIF and SOAP result inspection - Windows Identity Foundation strikes again :(

I use IdentityServer for users authentication from Silverlight 4 platform (WS-Trust).

When user sends proper credentials everything is fine of course and I create token cookie with additional claims on RP for Silverlight app.

When password is incorrect Silverlight app receives HTTP status code 500 (standard value for sending SOAP exceptions defined in/by SOAP specification).

Silverlight http stack ignores results with such status code, so I was trying to force STS to开发者_JS百科 modify this status code before sending it to the client. I was trying to do it installing/registering my instance of object with IDispatchMessageInspector interface on endpoint to modify status code on the fly (similar way SilverlightFaultBehavior does the modification for WCF Services cooperating with Silverlight) but it looks MS Guys again did something strange way (or I don't know something).

When result is ok (password is ok) I can modify HTTP status code and my method is called on object with IDispatchMessageInspector interface, but when password is incorrect the method on my incpection object is not called at all and I can't modify the result (HTTP status code) so the result is 500 again.

IdentityServer just instantiates WSTrustServiceHost host object with proper configuration so it looks the whole processing of WSTrust is done by WIF only.

I don't know what can happen when token is outdated already. Does WIF throw an exception with HTTP status 500 also? Is it possible to read exceptions generated by WIF on Silverlight platform?

Silverlight 5 should support WS-Trust, but if STS server sends HTTP status 500 does it ignore exception info again? Does anybody tested it with Silverlight 5 or maybe know solution of such problem?


You can receive any HTTP status code in Silverlight if you use the client networking stack. By default, Silverlight directs all HTTP requests through the browser, which sets certain limitations.

How to: Specify Browser or Client HTTP Handling (MSDN)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜