Authentication in dynamic XAP loading in Silverlight
I am using MEF to load my XAP files on the fly based on the user input. When the application starts, Shell validates the user and authentication is done by using Form Authentication. Once it is authenticated, it can load other XAP files based on user request. These XAP files are written indepe开发者_运维知识库ndly and each XAP file have its own RIA services back end services. As you can guess, these servers require authentication to get data from service. So the questions
- Is it possible to pass the authentication from Shell to other XAP files? based on my knowledge WebContext.Current is readonly so I can't pass that information.
- Even if we do, since all XAP files web context will be different since they all have different namespaces.
Thanks.
After some research it turned out, authentication can only happen at the Application startup no where else. That means, the Authentication Token and User setup estanblished at the start up. Without any change, so in my application, I need not do anything special to handle authentication event, even if the web context is different. (I am using Jounce). Hope this helps someone.
精彩评论