ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 25th, 2012, 11:51 AM
jesseplace jesseplace is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 6 jesseplace User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 38 sec
Reputation Power: 0
Using Windows Authentication and Form-Based

I realize there may be several approaches to accomplishing this, but if anyone has some advice on the best and simplest method, I would appreciate it...

Would like to have an intranet page that captures a user's domain username automatically when they are on a domain computer. I know this can be accomplished by setting up IIS to use Windows Authentication and then capture the LOGON_USER variable.

The problem is I would also like to make the site available outside the domain network, using some kind of form-database-based login within my application. For this I would have to allow anonymous access.

I really would be ok allowing anonymous access for the whole site and controlling security at the appluication level, but then I wouldn't be able to get the username of a domain user.

Any thoughts or help would be appreciated.

Reply With Quote
  #2  
Old May 25th, 2012, 11:01 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,234 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 20 m 49 sec
Reputation Power: 4445
If you haven't configured IIS to use windows authentication only, and if you haven't changed the default file permissions on your virtual directorym, then you already allow anonymous access to your web pages. You can google for any number of ways to create a database-driven login system in asp, or download some open-source apps that do logins and review the code they use.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #3  
Old May 26th, 2012, 07:09 AM
jesseplace jesseplace is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 6 jesseplace User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 38 sec
Reputation Power: 0
Understood, but that doesn't solve my problem of automatically authenticaing the user based on their AD username when they are on a domain computer (i.e. on the intranet)

Reply With Quote
  #4  
Old May 26th, 2012, 02:07 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,234 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 20 m 49 sec
Reputation Power: 4445
So your IIS isn't configured to support windows authentication? There are some wmi objects that let you query AD from code, maybe you can write or find a module that can do an application login from AD user data.

Reply With Quote
  #5  
Old May 31st, 2012, 11:09 AM
jesseplace jesseplace is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 6 jesseplace User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 38 sec
Reputation Power: 0
I can configure windows auth, but would prefer not to for users who are not on the local network. Think I found a reasonable work-around... Going to programmatically throw a 401 status if the user is on a local IP address...


If Request.ServerVariables("LOGON_USER") = "" Then
Response.Status = "401 Unauthorized"
Response.AddHeader "WWW-Authenticate","NTLM"
Response.End
Else
End If

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Using Windows Authentication and Form-Based

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap