Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK Beginning Expression Web ISBN: 978-0-470-07315-5
This is the forum to discuss the Wrox book Beginning Expression Web by Zak Ruvalcaba; ISBN: 9780470073155
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK Beginning Expression Web ISBN: 978-0-470-07315-5 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 Display Modes
  #1 (permalink)  
Old August 23rd, 2007, 04:48 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Active Directory authentication

Hi,

Newbie in EW, ASP and ASP.NET here. Is it possible to have a login form which authenticate the user against Active Directory? We have several domains.

Thanks.

Reply With Quote
  #2 (permalink)  
Old August 23rd, 2007, 11:43 AM
Wrox Author
 
Join Date: Feb 2007
Location: San Diego, CA, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, turn your project into an application within IIS by right-clicking the folder within IIS, selecting properties, and then click the Create button which is under the General tab.

Then go to the Directory Security tab, click the Edit button which is in the the Anonymous access authentication control section, uncheck Anonymous Access and make sure Integrated Windows authentication is checked. Close all the windows and your done. Your application will now rely on active directory for logging in.

Reply With Quote
  #3 (permalink)  
Old August 23rd, 2007, 08:21 PM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Zak,

Thanks for the reply. What if I still want the user to login, e.g. via login.aspx like in chapter 14? Can I also check the user belongs to which AD group?

I tried to reduce the number of ID list we'd have to maintain, so would prefer if can use AD.

Thanks.

Reply With Quote
  #4 (permalink)  
Old August 24th, 2007, 10:14 AM
Wrox Author
 
Join Date: Feb 2007
Location: San Diego, CA, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In that case, it's a bit more complex. There are two ways to do it: by hand (coding it) or by way of providers. Both are slightly involved. Personally, I would lean toward the providers model but it does require some setup and is vaguely detailed online. If you do go the code route, here's a good article that may help you out: http://www.15seconds.com/Issue/020730.htm

Zak

Reply With Quote
  #5 (permalink)  
Old August 24th, 2007, 10:28 AM
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
Default

IMHO, if you are creating an application that runs on an intranet and you are using the users domain login as the Username for the application, security should be completely transparent to them.

Having some sort of login page is pointless in this scenario because you make the reasonable assumption that a user logged onto a pc within a given domain has already verified their credentials against a PDC and has been authenticated onto the domain.

So, when x user comes to the app you can grab their login with User.Identity which will return [domain]\[userID] then you can query AD as neccessary to do anything that may be security related. For example Domain admins may see a certain function a Domain user would not. Forcing the user to push a button that really isn't going to "do" anything seems pointless to me.

In any event, that is my 2 cents!

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========
Reply With Quote
  #6 (permalink)  
Old August 24th, 2007, 12:47 PM
Wrox Author
 
Join Date: Feb 2007
Location: San Diego, CA, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That's actually a good point. I don't think you mentioned whether or not the application you're building is for internal use only? If so, a login page is useless.

Reply With Quote
  #7 (permalink)  
Old August 26th, 2007, 09:05 PM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Zak & dparsons,

For the moment, he application will be made available for both intranet only. But we have plan to allow user to access is from internet over SSL. That's why I'm looking for the login form against AD.

Zak, I'll dig the link first to see how hard/easy is it. Do you have any advice on how to get more detail for the providers way? Thanks.

Reply With Quote
  #8 (permalink)  
Old August 27th, 2007, 12:59 PM
Wrox Author
 
Join Date: Feb 2007
Location: San Diego, CA, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You may want to give ASP.NET 2.0 Unleashed by Stephen Walther a shot. That's a good desktop reference that I always recommend.

Reply With Quote
  #9 (permalink)  
Old August 27th, 2007, 01:13 PM
jminatel's Avatar
Wrox Staff
Points: 13,964, Level: 51
Points: 13,964, Level: 51 Points: 13,964, Level: 51 Points: 13,964, Level: 51
Activity: 22%
Activity: 22% Activity: 22% Activity: 22%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,835
Thanks: 51
Thanked 102 Times in 81 Posts
Default

Or Wrox's Professional ASP.NET 2.0 Special Edition by Bill Evjen. Also very good. :)
http://www.wrox.com/WileyCDA/WroxTit...470041781.html
Here's the TOC:
http://media.wiley.com/product_data/...70041781-2.pdf
you'll see chapters 14 and 15 on providers.

Jim Minatel
Acquisitions Director
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Reply With Quote
  #10 (permalink)  
Old December 19th, 2007, 10:26 AM
Registered User
 
Join Date: Dec 2007
Location: , , USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi toblo
I am also new to EW,
the class i was taken , ended on chapter 12
and im finishing on my own,
ive done everthing, and can not view my admin.aspx
page, error msg is URL failed to authenticate.
My createuser.aspx works, but the login always
refreshes, the event viewer shows the same error
each time Since you complete chap 14 any help would,
be greatly appreciated
brpage

Reply With Quote
Reply


Thread Tools
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
web service+active directory+authentication margeb ASP.NET 1.0 and 1.1 Professional 0 November 13th, 2005 08:23 AM
Active Directory Authentication planeswalk General .NET 2 October 27th, 2004 09:43 AM
active directory user Authentication problem sara_1981 General .NET 0 April 24th, 2004 01:58 AM
NT Authentication without Active Directory reyboy SQL Server 2000 0 October 15th, 2003 03:10 AM



All times are GMT -4. The time now is 03:37 AM.


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