473,387 Members | 1,903 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,387 software developers and data experts.

authentication problem

I am a newbie so I hope this is an easy one. I have an asp.NET app
(.NET 2.0) using windows auth. I am just trying to get the username
of the logged-in user (I mean their windows login, exchange 5.5 with
active directory). My AD domain is called "US" and my login is
"kstay"

So, my web.config file says <authentication mode="Windows" />, and I
am using the following 2 calls:
Context.User.Identity.Name.ToString
Context.User.Identity.AuthenticationType

They works fine in development environment on my machine, they return
"US\kstay" and "NTLM" respectively. Thats' what I want to happen!

THE PROBLEM is when I move it to my test server (win 2k3, IIS6) the
two calls return "USkstay" (no slash in between) and "Negotiate"
respectively.

If I add <identity impersonate="True" /to my web.config, it seems to
make no difference.

If I check "Enable anonymous access" in the website properties of IIS,
the two calls return "" and "" respectively.

Please help! Am i using the wrong calls? Wrong settings? Wrong
web.config params?

May 17 '07 #1
2 1301
Hi,

Impersonation means that further resource access would happen under the
account you impersomate as, not by the process identity (NETWORK SERVICE in
IIS 6.0 usually).If you enable anonymous access, you naturally get ""
because there's no authentication in that case.

Perhaps following article helps in understanding:
http://msdn.microsoft.com/msdnmag/is...s/default.aspx
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
"Keith" <ks****@nycap.rr.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
>I am a newbie so I hope this is an easy one. I have an asp.NET app
(.NET 2.0) using windows auth. I am just trying to get the username
of the logged-in user (I mean their windows login, exchange 5.5 with
active directory). My AD domain is called "US" and my login is
"kstay"

So, my web.config file says <authentication mode="Windows" />, and I
am using the following 2 calls:
Context.User.Identity.Name.ToString
Context.User.Identity.AuthenticationType

They works fine in development environment on my machine, they return
"US\kstay" and "NTLM" respectively. Thats' what I want to happen!

THE PROBLEM is when I move it to my test server (win 2k3, IIS6) the
two calls return "USkstay" (no slash in between) and "Negotiate"
respectively.

If I add <identity impersonate="True" /to my web.config, it seems to
make no difference.

If I check "Enable anonymous access" in the website properties of IIS,
the two calls return "" and "" respectively.

Please help! Am i using the wrong calls? Wrong settings? Wrong
web.config params?
May 17 '07 #2
On May 17, 2:38 pm, "Teemu Keiski" <jot...@aspalliance.comwrote:
Hi,

Impersonation means that further resource access would happen under the
account you impersomate as, not by the process identity (NETWORK SERVICE in
IIS 6.0 usually).If you enable anonymous access, you naturally get ""
because there's no authentication in that case.

Perhaps following article helps in understanding:http://msdn.microsoft.com/msdnmag/is...Briefs/default...

--
Teemu Keiski
AspInsider, ASP.NET MVPhttp://blogs.aspadvice.com/jotekehttp://teemukeiski.net

"Keith" <kst...@nycap.rr.comwrote in message

news:11**********************@y80g2000hsf.googlegr oups.com...
I am a newbie so I hope this is an easy one. I have an asp.NET app
(.NET 2.0) using windows auth. I am just trying to get the username
of the logged-in user (I mean their windows login, exchange 5.5 with
active directory). My AD domain is called "US" and my login is
"kstay"
So, my web.config file says <authentication mode="Windows" />, and I
am using the following 2 calls:
Context.User.Identity.Name.ToString
Context.User.Identity.AuthenticationType
They works fine in development environment on my machine, they return
"US\kstay" and "NTLM" respectively. Thats' what I want to happen!
THE PROBLEM is when I move it to my test server (win 2k3, IIS6) the
two calls return "USkstay" (no slash in between) and "Negotiate"
respectively.
If I add <identity impersonate="True" /to my web.config, it seems to
make no difference.
If I check "Enable anonymous access" in the website properties of IIS,
the two calls return "" and "" respectively.
Please help! Am i using the wrong calls? Wrong settings? Wrong
web.config params?- Hide quoted text -

- Show quoted text -
Teemu,
That's helpful, thanks. Any thoughts on my specific problem though?
I am just trying to get the windows login so I can look them up in a
database - not to authenticate them, just to identify them.

Thanks for any insight.

May 17 '07 #3

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

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
5
by: Rob | last post by:
I have an ASP.NET application that uses forms-based authentication. A user wishes to be able to run multiple sessions of this application simultaneously from the user's client machine. The...
4
by: Paul M | last post by:
hi there, i've got a website i created, that i've put onto my test server on the web. I have a login page, that when the user comes to it, it first pops up a windows authentication dialog box,...
5
by: Gavin Stevens | last post by:
I'm trying to figure out the ASP.NET Forms Auth I have 3 or 4 pages i want to allow anonymous access to.. Then I have 5 or 6 pages I placed in another directory in the webproject. These I want...
4
by: Chris Gatto | last post by:
Hi, I'm having what should be a minor problem but has turned into a 2 day slug fest with ASP.Net. I am simply attempting to authenticate my asp.net application users against users in an AD...
6
by: Ming Zhang | last post by:
Hi guys, I have couple of ASP.NET applications that only support digest windows authentication, and credentials are managed in a central AD. When users login to one app, they can easily navigate...
4
by: pjdouillard | last post by:
Hello all, Here is the context of my problem: We have an ASP.NET 1.1 application that has its own application pool setup and that runs under the identity of a NT Domain service account (this...
3
by: KNC | last post by:
Hi all, I'm developing a website and deployed on webserver, it always display an authentication dialog that user must login with valid Windows user. Would anyone helps to instruct how to...
2
by: Frank Swarbrick | last post by:
I am trying to understand "client authentication" works. My environment is DB2/UDB LUW 8.2 on zSeries SLES9 as the database server and DB2 for VSE 7.4 as the client. We currently have DB2/LUW set...
4
by: =?Utf-8?B?R3V1czEyMw==?= | last post by:
Hi, I created a web site on a remote server. To logon the user must enter a user id and password. The site is uses Forms Authentication. The web config file looks as follows: ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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
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...

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.