ASP.NET Request.LogonUserIdentity.Name is null
<p>I have an ASP.NET web form application that on the server side I need to know the user's identity.  I do not need to impersonate the user.  I just need their username so I can update some records in a database correctly.</p>

<p>When the request is processed I have the following line of code:</p>

<pre><code>string userName = Request.LogonUserIdentity.Name;
if(true == string.IsNullOrEmpty(userName))
{
  logger.logwarning("missing username");
}
else
{
  logger.loginfo("update by {0}", userName);
}
</code></pre>

<p>In my development &amp; QA environment this works perfectly - I see the userName in the log file and all of the database records have the lastModifiedBy field filled in correctly.  However, when we go to production - userName is an empty string!</p>

<p>UPDATE &amp; CLARIFICATION</p>

<p>I should have included this yesterday -</p>

<p>in web.config we have 


we do not want to impersonate the user b/c they will not have access to the backend system (Microsoft CRM) but the service account does.</p>

<p>Inside IIS we have anonymous access turned off and Windows Integrated Security turned on.  The application is running in its own Virtual Directory and has an application and app pool assigned to it.</p>

<p>Overall the stuff appears the same as our staging server.  I know diagnosing this via a short post on stack overflow is a PITA, but I'm grasping for staws at this point.  I know this is something really lame like a checkbox I forgot to click or a minor little setting that usually doesnt matter.</p>

<p>Anyway, I apperciate any suggestions that come my way.</p>
