In an ASP.NET 3.5 project built with VB.NET and run in Visual Studio 2008, the following snippet of code pulls my login name:
Dim EmployeeLogin As String = Request.ServerVariables("LOGON_USER")
In my ASP.NET 4.0 project built with C# and run in Visual Studio 2010, the similar snippet of code pulls an empty string:
string logonUser = Request.ServerVariables["LOGON_USER"];
Both projects call for:
<system.web>
<authentication mode="Windows" />
</system.web>
Both are being run on my PC.
Why does the VB version work and the C# version not work ...or is this a VS2008 verses VS2010 issue?
~Joe
Avoid Sears Home Improvement