473,408 Members | 2,839 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,408 software developers and data experts.

AUTH_USER & User.Identity.Name?

Hi,

I have a dev machine, part of a domain, with a site set to Integrated
security only. I want to determine the username of person accessing the
page. When I run the page with the following code:

Response.Write(Request.ServerVariables["AUTH_USER"]);
Response.Write("<BR>");
Response.Write(HttpContext.Current.User.Identity.N ame);

It outputs:

DEVSERVERNAME\Administator
DEVSERVERNAME\Administator

but I thought it would be my username ("US" stands for our US domain):

US\dsmith
US\dsmith

I took "dsmith" out of the Administrators group but I still get the
Administrator to appear.

Another user tested the page and she got her credentials displayed back OK.

What am I not getting? Thanks.
Nov 18 '05 #1
4 4896
Are you one the server when you are testing it? Or are you hitting it
remotely. The User.Indentity.Name should display the name you are logged as
on the machine the browser is on.

bill

"Dave" <Da**@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
Hi,

I have a dev machine, part of a domain, with a site set to Integrated
security only. I want to determine the username of person accessing the
page. When I run the page with the following code:

Response.Write(Request.ServerVariables["AUTH_USER"]);
Response.Write("<BR>");
Response.Write(HttpContext.Current.User.Identity.N ame);

It outputs:

DEVSERVERNAME\Administator
DEVSERVERNAME\Administator

but I thought it would be my username ("US" stands for our US domain):

US\dsmith
US\dsmith

I took "dsmith" out of the Administrators group but I still get the
Administrator to appear.

Another user tested the page and she got her credentials displayed back OK.
What am I not getting? Thanks.

Nov 18 '05 #2

Hi Dave,

Are you sure that you are logged in to windows not as Administrator and
instead with your domain account?
Ethem Azun

"Dave" wrote:
Hi,

I have a dev machine, part of a domain, with a site set to Integrated
security only. I want to determine the username of person accessing the
page. When I run the page with the following code:

Response.Write(Request.ServerVariables["AUTH_USER"]);
Response.Write("<BR>");
Response.Write(HttpContext.Current.User.Identity.N ame);

It outputs:

DEVSERVERNAME\Administator
DEVSERVERNAME\Administator

but I thought it would be my username ("US" stands for our US domain):

US\dsmith
US\dsmith

I took "dsmith" out of the Administrators group but I still get the
Administrator to appear.

Another user tested the page and she got her credentials displayed back OK.

What am I not getting? Thanks.

Nov 18 '05 #3
That's what's weird. I'm browsing it from my desktop and logged in with my
domain account.

"William F. Robertson, Jr." wrote:
Are you one the server when you are testing it? Or are you hitting it
remotely. The User.Indentity.Name should display the name you are logged as
on the machine the browser is on.

bill

"Dave" <Da**@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
Hi,

I have a dev machine, part of a domain, with a site set to Integrated
security only. I want to determine the username of person accessing the
page. When I run the page with the following code:

Response.Write(Request.ServerVariables["AUTH_USER"]);
Response.Write("<BR>");
Response.Write(HttpContext.Current.User.Identity.N ame);

It outputs:

DEVSERVERNAME\Administator
DEVSERVERNAME\Administator

but I thought it would be my username ("US" stands for our US domain):

US\dsmith
US\dsmith

I took "dsmith" out of the Administrators group but I still get the
Administrator to appear.

Another user tested the page and she got her credentials displayed back

OK.

What am I not getting? Thanks.


Nov 18 '05 #4
That is really strange...I have thought of a couple things to try out.

Add the following section to your web.config on the dev server.
<authorization>
<allow users="us\dsmith" />
<deny users="*" />
</authorization>

It should prompt you for a login box since it is trying to authenticate you
as devserver/administrator. Try to login with your us/dsmith login on the
box and see what happens.

Are you using impersonation on the server?

The identity sent to the webserver comes from the browser settings. It is
at all possible that you have logged in and chose to save password in the
past. Perhaps your IE has cached the username/password and it resending it
to the server.

If this is possibly the case, maybe you could try reseting the administrator
password on your dev server. That way if any user/pass has been cached, it
will fail and prompt you for the login box.

Just shooting in the dark here.

HTH,
bill
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
That's what's weird. I'm browsing it from my desktop and logged in with my domain account.

"William F. Robertson, Jr." wrote:
Are you one the server when you are testing it? Or are you hitting it
remotely. The User.Indentity.Name should display the name you are logged as on the machine the browser is on.

bill

"Dave" <Da**@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
Hi,

I have a dev machine, part of a domain, with a site set to Integrated
security only. I want to determine the username of person accessing the page. When I run the page with the following code:

Response.Write(Request.ServerVariables["AUTH_USER"]);
Response.Write("<BR>");
Response.Write(HttpContext.Current.User.Identity.N ame);

It outputs:

DEVSERVERNAME\Administator
DEVSERVERNAME\Administator

but I thought it would be my username ("US" stands for our US domain):

US\dsmith
US\dsmith

I took "dsmith" out of the Administrators group but I still get the
Administrator to appear.

Another user tested the page and she got her credentials displayed
back OK.

What am I not getting? Thanks.


Nov 18 '05 #5

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

Similar topics

1
by: Rich | last post by:
I am running IIS6 on a Win2k3 server. I have an ASP.Net app (C#) that a user logs into and then I use LogonUser to validate them and log them onto the server. I have Windows Authentication ONLY...
36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
4
by: Nedu N | last post by:
Hi, I am using Forms authentication -in which - I am trying to use User.Identity.Name, i am getting the user name in this field even after i logout (i.e, FormaAuthentication.SighnOut(), and...
2
by: lucd | last post by:
Hello, I am currently playing with form authentication & role based security on a web application. As seen in the starter kit Time tracker, I setup a custom identity class (CustomPrincipal)...
4
by: Jim in Arizona | last post by:
I'm new to aspnet with only limited experience with classic asp. Since I'm on a domain and all users are authenticated. In the past using classic asp I used request.servervariables("auth_user") to...
2
by: Jim in Arizona | last post by:
Being new, i experiment a lot and usually get results I'm not hoping for. My current problem is reading from a SQL 2000 table and populating an ASP dropdownlist with a column from the table. The...
2
by: z f | last post by:
trying to achieve windows authentication on the fly (without the file configured to deny anonymous access in IIS) i returned a 401 status if the Request.ServerVariables("auth_user") = "" this...
0
by: Mark Rae | last post by:
Hi, I apologise that this isn't *specifically* an ASP.NET issue - I will also post it to the IIS newsgroup - but I thought I'd ask here anyway on the off-chance that someone may have come across...
0
by: =?Utf-8?B?RHVuZTg4?= | last post by:
Hi there, We're using windows authentication in our web app and calling "thread.currentprincipal.identity.name" to get the currently logged on user name. On our system, the "pre-Windows 2000"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...

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.