开发者

How to presist the user authentication in SL3 + RIA

开发者 https://www.devze.com 2022-12-27 19:54 出处:网络
I am developing SL3 + RIA services with custom authentication. I followed the example in http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2661 to implement custom aut

I am developing SL3 + RIA services with custom authentication. I followed the example in http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=2661 to implement custom authentication.

Based on the implementation, you first do login request from client to service. This request is async process. Since login is async, the control will go back to GUI which then starts to do data bind in SL controls using RIA services, the services happens to requires the authentication to be successful (by adding [RequireAuthentication] attribute). The trouble is, since you requested login might not have completed before the data binding starts t this stage the authentication is false because of that data binding will fail.

I would like to know if you require your web services to have 'RequireAuthentication' how would you wait for authentic开发者_JAVA技巧ation to complete at the server side or client side. Appriciate the help.

Thanks,


  • Found the answer, the way I have designed the controls was the problem, instead of start binding the control, I moved it to start the binding after the login is successful solved the problem.*
0

精彩评论

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

关注公众号