473,413 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

HttpContext.Current.Request.ServerVariables["LOGON_USER"];

I recentlly converted some web services to 2.0. So far everything has worked
great with the exception of one of the functions in an AD service.

the following code:
string sUser = HttpContext.Current.Request.ServerVariables["LOGON_USER"];

Worksk fine if debugging in VS 2005 but when I publish to the server. An
empty string is returned. I have tried to catch an error and does not appear
to be one.
Mar 1 '07 #1
1 10269
Use Thread.CurrentPrincipal.Identity.Name instead.

"Brad King" <Br******@discussions.microsoft.comwrote in message
news:39**********************************@microsof t.com...
>I recentlly converted some web services to 2.0. So far everything has
worked
great with the exception of one of the functions in an AD service.

the following code:
string sUser = HttpContext.Current.Request.ServerVariables["LOGON_USER"];

Worksk fine if debugging in VS 2005 but when I publish to the server. An
empty string is returned. I have tried to catch an error and does not
appear
to be one.

Mar 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Amitava Bardhan | last post by:
Request.servervariables("Logon_USer") is working perfectly well for one asp page returning the NT userid as expected but returning an empty string for another asp page.Both the asp pages are in the...
5
by: T. | last post by:
Hello, I'm trying to pull the logon user's name using Request.ServerVariables("LOGON_USER")...which is returning nothing...so I need help in determining why it's returning nothing, or I need the...
1
by: Amitava Bardhan | last post by:
Request.servervariables("Logon_user") returns and empty string on one asp page but works perfectly well returning the NT user id on the other asp page. Both the pages are in the same directory....
0
by: Amitava Bardhan | last post by:
Request.servervariable("Logon_User") working perfectly well returning the NT userid on one asp page but returning an empty string on the other asp page though both the asp pages are in the same...
1
by: dmjames | last post by:
For one of our machines, Request.ServerVariables("LOGON_USER") is returning the wrong value. Person A is logged into the machine (I watched him log in), but when he retrieves an aspx page...
0
by: Lyners | last post by:
We have an intranet where a majority of users are in our active directory, but not all. We have recently upgraded to using asp.net on our servers and during the rollout ran into a problem. The...
3
by: Jeff Cochran | last post by:
First time I've seen this and I'm not even sure where to look for the answer. An ASP page with only this code: <% Response.Write "User: " & Request.ServerVariables("LOGON_USER") %> On most...
1
by: Ryan | last post by:
I am trying to figure out why I am trying to use the result of Request.ServerVariables("LOGON_USER") in a query in my aspx application. I want to use the server variable. When I check the...
7
by: Smurfas | last post by:
Hi, everything simple: string strWhatever = Request.ServerVariables("LOGON_USER"); TextBox1.Text = strWhatever; Found, my Computer name. But how found another computer name, when I have IP....
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.