Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Request.ServerVariables("LOGON_USER") Returns Empty String in My Project

$
0
0

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


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>