Windows authentication(NTLM) in a silverlight application “Out of browser”
-
12-11-2019 - |
Question
I've a web application, which works without any problem in my browser. But if I install it out-of-browser, when I try to get the username, the userAccount isn't in the dictionary:
private void Application_Startup(object sender, StartupEventArgs e) {
string userId = e.InitParams["UserAccount"];//--> KeyNotFoundException
//...
}
Which is normal because I give it through the launch of silverlight in the aspx web page:
<param name="InitParams" value="UserAccount=<%=HttpContext.Current.User.Identity.Name%>" />.
I need it because sometimes in my application, I need to display the current logged user, and display that it's this user which will do this or this action before I save it.
So, one question:
- How to manage to ensure that the user has the right to load the application AND retrieve the userId.
Thank you very much!
J4N
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow