Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 10th, 2007, 09:55 AM
Authorized User
Join Date: Jul 2007
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?


Old July 10th, 2007, 05:41 PM
Wrox Author
Join Date: Oct 2005
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??
================================================== =========
Old July 12th, 2007, 07:30 AM
Authorized User
Join Date: Jul 2007
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.


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

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