OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

Active Directory Authentication

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Active Directory Authentication
Page: [1]
 
 
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
Active Directory Authentication - 6/8/2009 12:35:33   
Hi, I would like to create an intranet and I would like that the user will log in to th e web with their Active Directory Authentication.
Can anyone help me with that?
Thanks
swoosh

 

Posts: 1574
Joined: 5/18/2002
From: Beaver Falls, PA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 12:55:53   
Wouldn't that be just setting a permission to the folder that the intranet site is contained within?.....or even setting a mapped drive to the folder for the group that has the permissions to the site

_____________________________

Swoooosh
Just Do It!


(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 16:01:09   
No, every user have to choose something it's like a vote to something. after the user vote I am taking the vote details and update my database

(in reply to swoosh)
swoosh

 

Posts: 1574
Joined: 5/18/2002
From: Beaver Falls, PA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 16:20:33   
Another words, you want the voting poll to show up the minute they log in?

_____________________________

Swoooosh
Just Do It!


(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 16:39:50   
no i just want every user will choose something from a combo and I'm going to update the database with the username and his choice

(in reply to swoosh)
swoosh

 

Posts: 1574
Joined: 5/18/2002
From: Beaver Falls, PA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 16:48:14   
Oh, sorry for the confusion on my part. I was misinterpreting your post from the title that you gave it. So you basically want them to have access to a web page with a form of drop downs, check boxes whatever and then have them choose. After choosing, the info gets sent to the database which in turn is automatically updated with count results

Am I getting it?

_____________________________

Swoooosh
Just Do It!


(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 16:51:00   
the part of the choosing you are right. I have to knoe who choose what which mean i have to send the user details also to the database

(in reply to swoosh)
swoosh

 

Posts: 1574
Joined: 5/18/2002
From: Beaver Falls, PA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 16:54:59   
quote:

I have to knoe who choose what which mean i have to send the user details also to the database


Without them putting their name or choosing their name on the voting form .........you want their name to be picked up automatically via the Active Direcotry Authentication?

_____________________________

Swoooosh
Just Do It!


(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/8/2009 17:05:27   
yessssss :-)

(in reply to swoosh)
clum1

 

Posts: 778
From: Glasgow, Scotland
Status: offline

 
RE: Active Directory Authentication - 6/9/2009 3:55:03   
In IIS, right click on the site and choose Properties. Click on the Directory Security tab and click Edit. Remove the tick from "Enable Anonymous Access" and add a tick at "Integrated Windows autehntication".

This will cause your server to authenticate all users agains their Windows AD logon accounts; IE will do this automatically (users will see no changes) whilst other browsers will require a logon with their AD credentials.

You can do various things once you have set this up; one useful function allows you to capture the user's login name and use it for (e.g.) security on pages; I use the following function (possibly even supplied by someone here years ago!) to compare login name with a list of know staff on my intranet:

'Function to determine user's NT Username
Function NTUserName()

Dim logon, myArray

'will return Domain\Username or just Username depending
'if the user is logged into the domain or their local machine.
logon = Request.ServerVariables("LOGON_USER")

'so we split the logon variable by the "\"
myArray = Split(logon, "\", -1, 1)

'take the upper bound of the logon variable
logon = myArray(Ubound(myarray))

'and you're left with just the NT Username
NTUserName = lcase(logon)

End Function



_____________________________

kenilweb.com; simple, effective web design

"So I said to the Gym instructor "Can you teach me to do the splits?" He said "How flexible are you?". I said "I can't make Tuesdays"."

Tim Vine

(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/15/2009 10:01:29   
Hi, thanks it's working on my computer but now the problem is when I install my code at the server so anyone will be able to login it is not working. if I load just simple HTML file it is working. this is my code
<FORM action="UserDB.asp" method=get id=form1 name=form1>
<%
	'will return Domain\Username or just Username depending 
	'if the user is logged into the domain or their local machine. 
	logon = Request.ServerVariables("LOGON_USER") 
	UserName1=Request.ServerVariables("PATH_INFO")
	'so we split the logon variable by the "\" 
	myArray = Split(logon, "\", -1, 1) 

	Set objADSysInfo = CreateObject("ADSystemInfo")
	strUser = objADSysInfo.username

	Set objUser = GetObject("LDAP://" & strUser)
	UserSingleNameCounter=len(objUser.name)-3
	UserSingleName=right(objUser.name,UserSingleNameCounter)
	Response.Write "<br><br>Hello " & right(objUser.name,UserSingleNameCounter)

	'take the upper bound of the logon variable   objUser.name
	logon = myArray(Ubound(myarray)) 

	'and you're left with just the NT Username 
	NTUserName = lcase(logon) 

	'Response.Write "<br><br><br><br>" & NTUserName
	Response.Write "<INPUT type=hidden id=UserSingleName name=UserSingleName value=" & NTUserName & ">"
	Response.Write "<INPUT type=hidden id=NTUserName name=NTUserName value=" & NTUserName & ">"
	%><br><br><br><br>
<INPUT type="submit" value="äîùê" id=submit1 name=submit1>

</FORM>

can anyone please help me....
Thanks, Elen

(in reply to clum1)
clum1

 

Posts: 778
From: Glasgow, Scotland
Status: offline

 
RE: Active Directory Authentication - 6/15/2009 10:27:45   
You are running this on a server in your own Active Directory rather than a web hosting company aren't you? If the latter, it won't work - you'll also need to set the permissions in IIS on the server - you may need to speak to your IT dept for this.

_____________________________

kenilweb.com; simple, effective web design

"So I said to the Gym instructor "Can you teach me to do the splits?" He said "How flexible are you?". I said "I can't make Tuesdays"."

Tim Vine

(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/15/2009 10:32:16   
yes i am running this on a server in my Active Directory and I set the permissions to everyone full control but still i can't load it

(in reply to clum1)
clum1

 

Posts: 778
From: Glasgow, Scotland
Status: offline

 
RE: Active Directory Authentication - 6/15/2009 10:40:03   
I'm not sure why you'd set "everyone full control"? You are actually restricting "everyone" and only allowing authenticated users:

quote:

In IIS, right click on the site and choose Properties. Click on the Directory Security tab and click Edit. Remove the tick from "Enable Anonymous Access" and add a tick at "Integrated Windows autehntication".


Have you done this in the same way as for your dev PC?

_____________________________

kenilweb.com; simple, effective web design

"So I said to the Gym instructor "Can you teach me to do the splits?" He said "How flexible are you?". I said "I can't make Tuesdays"."

Tim Vine

(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/15/2009 10:44:48   
no but I removed it from the server and it still doesn't work. I did everything like in my DEV

(in reply to clum1)
clum1

 

Posts: 778
From: Glasgow, Scotland
Status: offline

 
RE: Active Directory Authentication - 6/15/2009 11:01:40   
Probably the best way to tell if you've set it up correctly without worrying about any mistakes in your code is to make the change to the particular site on the server (ie. setting up authentication) and then attempt to access it through FireFox (not Internet Explorer); as you attempt to connect to the site, FF will request your windows username and password; IE does not as it integrates AD authentication.
What happens when you try this?

_____________________________

kenilweb.com; simple, effective web design

"So I said to the Gym instructor "Can you teach me to do the splits?" He said "How flexible are you?". I said "I can't make Tuesdays"."

Tim Vine

(in reply to wizard_oz)
wizard_oz

 

Posts: 158
Joined: 9/3/2004
From: Ga,USA
Status: offline

 
RE: Active Directory Authentication - 6/15/2009 11:52:55   
the main problem is with those line
Set objADSysInfo = CreateObject("ADSystemInfo")
strUser = objADSysInfo.username
Set objUser = GetObject("LDAP://" & strUser)
the soulution that i found is not use it and caculate the length of the display name from the Request.ServerVariables("LOGON_USER")

(in reply to clum1)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Active Directory Authentication
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts