Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 12th, 2006, 05:19 PM
Authorized User
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Fresno, California, USA.
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default Grabbing user login info

Hey all,

I really aint a beginner anymore but this seems like a beginner question as I am having a hard time finding the answer. On a company network in the same domain, I want my web apps to be user aware. Meaning when someone hits my site, I can grab their login name or string. Not the password, i want windows to take care of all the authentication, I just want to know who it is. This is on an intranet. I have tried the WindowsIdentity class but found some strange results. When I test it in VS2K5, I get the results I want as it knows me. I put it up on the app server and hit it and it comes back with the NT AUTHORITY hehe. Anyone wanna nudge me in the right direction?

Reply With Quote
  #2 (permalink)  
Old May 12th, 2006, 07:06 PM
Authorized User
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Fresno, California, USA.
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I hate when I post a question and find the answer. So, just so everyone can know what i was doing wrong.

WindowIdentity, HttpContext and Thread can all get back a user's login info from the browser but they all work differently according to what you have configured in the Web.Config. My issue was missing the impersonate line which has to be true with Windows authentication for WindowIdentity to grab the current user's info. You can find this info I found here on MSDN site and worth looking at if you ever going to work for a company who doesn't want their users logging into every site. Works good too if you have the SIDs for the groups in AD for your network as you can even make pages group based based on the SIDs. This model makes me able to build the pages and have someone else administer the rights by just knowign Active Directory hehe. Also, i don't have to mess with LDAP this way. Any, info on the impersonation stuff is here.

http://msdn.microsoft.com/library/de...SecNetAP05.asp


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help passing login info to new page peterh Classic ASP Basics 4 January 10th, 2008 12:39 PM
Passing NT Login Info negrette Classic ASP Professional 1 October 25th, 2004 02:37 PM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM
How do I store user login info to use in a form? lanctotd Classic ASP Basics 1 July 15th, 2003 08:06 PM



All times are GMT -4. The time now is 09:10 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.