473,586 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AUTH_USER & User.Identity.N ame?

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.ServerV ariables["AUTH_USER"]);
Response.Write( "<BR>");
Response.Write( HttpContext.Cur rent.User.Ident ity.Name);

It outputs:

DEVSERVERNAME\A dministator
DEVSERVERNAME\A dministator

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 4918
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**@discussio ns.microsoft.co m> wrote in message
news:58******** *************** ***********@mic rosoft.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.ServerV ariables["AUTH_USER"]);
Response.Write( "<BR>");
Response.Write( HttpContext.Cur rent.User.Ident ity.Name);

It outputs:

DEVSERVERNAME\A dministator
DEVSERVERNAME\A dministator

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.ServerV ariables["AUTH_USER"]);
Response.Write( "<BR>");
Response.Write( HttpContext.Cur rent.User.Ident ity.Name);

It outputs:

DEVSERVERNAME\A dministator
DEVSERVERNAME\A dministator

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**@discussio ns.microsoft.co m> wrote in message
news:58******** *************** ***********@mic rosoft.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.ServerV ariables["AUTH_USER"]);
Response.Write( "<BR>");
Response.Write( HttpContext.Cur rent.User.Ident ity.Name);

It outputs:

DEVSERVERNAME\A dministator
DEVSERVERNAME\A dministator

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.
<authorizatio n>
<allow users="us\dsmit h" />
<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**@discussio ns.microsoft.co m> wrote in message
news:91******** *************** ***********@mic rosoft.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**@discussio ns.microsoft.co m> wrote in message
news:58******** *************** ***********@mic rosoft.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.ServerV ariables["AUTH_USER"]);
Response.Write( "<BR>");
Response.Write( HttpContext.Cur rent.User.Ident ity.Name);

It outputs:

DEVSERVERNAME\A dministator
DEVSERVERNAME\A dministator

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
2889
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 checked on the site in IIS. My problem is that eventhough I am using LogonUser to log on to the server as the user, I am still getting the...
36
16352
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 path with a FSO: Set myFile = Server.CreateObject("Scripting.FileSystemObject").GetFile("\\server2\myshare\myfile.txt") this fails with an Permission...
4
5437
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 also i am trying to use User.Identity.IsAuthenticated for checking whether the User has logged in or not. I don't want to store the user name in...
2
4704
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) because i wanted some extra info about the current user, i need this extra information to be available in pages without having
4
4271
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 grab the domain logon name of the user. Is there a better way or more detailed way in aspnet? Like, instead of putting "mydomain\bobjones" into a...
2
1699
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 only thing displayed in the DropDownList is: System.Data.Common.DbDataRecord So, under the Page_Load Event, here's my code: Dim strSQL,...
2
2036
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 is OK, the 401 status Code returned with additional headers and the browser performed windows authentication and the next time i had auth_user...
0
3915
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 this before... It's an intranet system written in ASP.NET v1.1 using C#. The site is running on IIS6 on Win2k3S with all the SPs and patches etc....
0
917
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" field is set for domain users in Active Directory and "thread.currentprincipal.identity.name" returns: pre-Windows_2000_domain\username Is there...
0
7911
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6610
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.