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.*
精彩评论