title: Windows authentication(NTLM) in a silverlight application "Out of browser"
body: <p>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:</p>
  
  <pre><code>private void Application_Startup(object sender, StartupEventArgs e) {
    string userId = e.InitParams["UserAccount"];//--&gt; KeyNotFoundException
    //...
  }
  </code></pre>
  
  <p>Which is normal because I give it through the launch of silverlight in the aspx web page:</p>
  
  <pre><code>&lt;param name="InitParams" value="UserAccount=&lt;%=HttpContext.Current.User.Identity.Name%&gt;" /&gt;.
  </code></pre>
  
  <p>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.</p>
  
  <p>So, one question:</p>
  
  <ul>
  <li>How to manage to ensure that the user has the right to load the application AND retrieve the userId.</li>
  </ul>
  
  <p>Thank you very much!</p>
  
  <p>J4N</p>