title: Trying to read from web.config - getting error
body: <p>In my web.config I have the following:</p>
  
  <pre><code>  &lt;appSettings&gt;
      &lt;add key="webpages:Enabled" value="false" /&gt;
      &lt;add key="authorizedUsers" value="jeff,jason,bob"/&gt;
    &lt;/appSettings&gt;
  </code></pre>
  
  <p>In my _Layout.cshtml I have the following:</p>
  
  <pre><code>@{
          List&lt;String&gt; authList = new List&lt;string&gt;();
          authList = System.Web.Configuration.WebConfigurationManager.AppSettings["authorizedUsers"].Split(',').ToList();
  
          if (authList.Any(u=&gt;u == this.User.Identity.Name))
          {
              &lt;li&gt;@Html.ActionLink("Admin", "Index", "Admin")&lt;/li&gt;
          }                               
  }
  </code></pre>
  
  <p>When I run this I get <code>Object reference not set to an instance of an object.</code> What do I need to do to get this to work?</p>