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
| FAQ | Members List | 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 10th, 2007, 09:55 AM
Authorized User
Join Date: Jul 2007
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I show user name on our Intranet?

I am developing an Intranet and I want to display the user name on the page.

I seem to be having difficulty getting authentication to work with IIS. I don't want the users to be forced to type in a login and password, I want their existing network/Active Directory credentials to be authenticated automatically.

I have played with our IIS settings and the web.config file ad nauseam, and I am getting frustrated. As far as I can tell, I have the settings exactly like the tutorials I have seen on the web.

I have "allow anonymous access" turned OFF.
I have "Windows Integrated Authentication" turned ON.

In my web.config file, I have tried turning "impersonate" ON and OFF with no noticeable effect.

My vb code is:
Dim authuser As WindowsIdentity = WindowsIdentity.GetCurrent()
System.Web.HttpContext.Current.Response.Write(auth user.Name.ToString())

Can someone tell me the settings I need to have for IIS and web.config?


Reply With Quote
  #2 (permalink)  
Old July 10th, 2007, 05:41 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

Have you tried getting the value of the AUTH_USER server variable?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
================================================== =========
Why can't Programmers, program??
================================================== =========
Reply With Quote
  #3 (permalink)  
Old July 12th, 2007, 07:30 AM
Authorized User
Join Date: Jul 2007
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts


Thank you for replying. I am not having problems reading the user variable. My problem is that when I turn "anonymous access" off, and "integrated windows authentication" on, the web site challenges everyone on the network for their login/password.

I want our Intranet to work so that people don't get challenged for a login/password and their current network credentials are used to authenticate them. I have followed several "how to" articles, but I think our net admin has something misconfigured with active directory...or maybe I do with IIS.

Also, I want users to be able to download network files via the Intranet without being challenged. If they click a link pointng to a file sitting out on the network somewhere, I don't want them to be challenged.

If anyone has this working and is willing to share their settings for AD and IIS, I would appreciate it.


Reply With Quote

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
show data for a specific user momo BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 July 17th, 2006 09:08 PM
how to show user interface data in crystal report sanjay_jadam Crystal Reports 1 May 26th, 2005 02:25 AM
Slide Show #1 (New User) WebDevel Javascript How-To 1 March 15th, 2005 09:58 AM
Show web user control hidden see07 ASP.NET 1.x and 2.0 Application Design 4 February 3rd, 2005 12:09 PM
Using ThePhile for company intranet? climbingrose BOOK: ASP.NET Website Programming Problem-Design-Solution 5 January 22nd, 2005 11:51 AM

All times are GMT -4. The time now is 05:52 AM.

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