Retreiving Users Details Via LDAP
I have a form which only authenticated users can access (Basic Auth against an ADS domain). Currently, I use Request.ServerVariables("LOGON_USER") to display the login name of the user. This information is both displayed and submitted as apart of the form in a hidden field.
What I would like to do is to poupulate the form with user details from an LDAP directory (ADS at this stage, but quite possibly changing to CA eTrust) such as Name, Email Address, and contact numbers. Does anyone know of any resources which might outline how to acheive this, preferably with any code samples to acheive this?
View Replies
ADVERTISEMENT
I am looking into creating a intranet at work which will do a number of things including forums etc but one thing that i would like to do i dont know if it is possible or not.
When a user signs into their workstation it will launch the intranet, no problem, then i want it to log them in as the user id they logged into the workstation as. Is there any way of getting this information???
View Replies
View Related
I have ASP1 page with few input text fields.All the field have similar name ie testf1, but different id.
eg
<form name="test1">
<input name="testf" id="TF1" type="text" >
<input name="testf" id="TF2" type="text" >
</form>
When I summit this form, It called another asp2.On this asp2, I would like to retrived all the fields values from ASP1, using id.Is there any way I can retreive fields values using id.
View Replies
View Related
I have 2 fields in my table
Warning1
Warning2
They are varchar type and hold date data
So i want to check if todays date is between warning1 and warning 2
strdate=getdate()
strwarn1=rs("Warning1")
strwarn2=rs("Warning2")
str="select * from records where strdate between ('" & strwarn1 & ", " & strwarn2 & "')"
View Replies
View Related
how to selct from a database all records that have the same Company Name and have that information automatically change depending on who is logged in, based on there Company Name.If Acme company has 5 members signed up I want any of those users that login be able to view all other users from that company.Is there a way of writing the script to do this?
View Replies
View Related
I've had a look around for a few hours for a solution to this problem but can't really find one so maybe someone can help or point me in the right direction.I have a database with fields like Name Date Project Hours worked etc and i want to make an online form where the user can type in their name and the date and it will show the record that contains there name and that date.
View Replies
View Related
I am retreiving the records and placing them in the original form with stuff going in its own text boxes and all. i have a few checkboxes and when i retreive the records,i want to even see the checks in the checkboxes.
so that the user can see all the info abt that record and if they want to uncheck any. they can do so. So how do i retreive those checks in the checkboxes?
View Replies
View Related
I want to be able to log in a database any transactions my users perform. For example logging in, requesting a page, downloading a resource, logging out etc.
What is the most practical way to code this? I was thinking of trying to use an include file which would have a function to add a log in the database for each page on the site or when a particular action is performed.
View Replies
View Related
I on my site i have a form that users fill in, once they have filled it in, they are then redirected to a preview page. All this is fine.
Then users get redirected to a secure third party that takes all the customers credit card details and checks them all.
If they are all authorised then it will the go back to my page to confirm that everything is ok and that their information has now been added.
What the problem is that i can not carry the information through the secure servers pages and what I need to do is basically get the user to fill out the form have it inserted to the database, then they pay for it, If all ok i want to be able to insert a "confirmed" into the payment field for the advert that they have placed or if it fails for it to say "awaiting payment" in the payment field and a message on the screen to tell them to contact sales team.
View Replies
View Related
basically i have given each customer, in tbl_user, that goes through the first page an "autonumber" (userID) and then each window has this same userID for each window that user selected. so i can then see the relationship between what user wants what windows.
My trouble is that im having difficulty creating a system where the correct userID is entered with the window Code:
View Replies
View Related
I have 3 tables, product, industry and plist. product has productID and product, industry has industryID and industry, plist has productID foreign key with productID on product table and industryID foreign key with industryID on industry table.
In the plist table I am storing the productID and the industryID's that relate to that productID..
industryID productID
1 4
1 7
1 9
1 10
etc.
What I want in my ASP page is to return the actual products that each industry serves. So for the above example my script should return the products in the product table that relate to the productID's 4, 7, 9, 10, when I search it by industryID 1. I hope this is making sense. Code:
View Replies
View Related
i need to go through a list of items and check to see if items on list 1 are on list 2 and vise-versa. so im going to look at item 1 on list 1, and go through all the items on list 2. if i find a match, ill update the record on list 1, if i dont find a match ill update the record on list 2.
im going to need a nested loop. in c++ i know how i could do this, but im not sure as how to do it in vbs/asp. can you do for each "record" in "myrecordset"? or do i have to get the number of records in the table and run the loop that many times? which would be eaister?
View Replies
View Related
I am trying to use windows (nt/xp) authenication for a website which can be accessed from internet as well as intranet. Our windows authentication uses active directory(win 2kservers). On login page for website, I have get username from windows and then ask for entering the password again. Send this information to active directory and query active directory if user is employee or contractor. if Employee, then user can access the contents on web site other wise user gets a messge saying insuffcient priviledges. I would appreciate if some one could send me code snippets.
View Replies
View Related
Im trying to run an LDAP script from an ASP page. I know very little about LDAP, and just based on some sample code I found on the internet, I got the following:
<%
Set Conn=CreateObject("ADODB.Connection")
Conn.Provider="ADSDSOObject"
Conn.Open("ADs Provider")
Set rs=Conn.Execute("ldifde -f UsersFile.ldf -p Subtree -r
"(&(objectClass=user)(showinaddressbook=CN=Global Address
List,OU=Microsoft Exchange,OU=CMC,OU=D-corp,OU=Organizations,DC=d-corp,DC=corp))"")
Do While Not rs.EOF
ReturnValue=rs.Fields(0)
Response.Write ReturnValue&"<BR>"
%>
Obviously, it does not work !! If someone can help me with what direction I should be proceeding in to change the code so that it works?
Is it because I havent specified the server name or something, or is it because I cant execute an LDAP command like ldifde in such a straightforward manner and I need to change that?
View Replies
View Related
The users on my network, log in using a novell login box when they boot up their pc.
When they open their browser, they have to enter the same username and password to log into our intranet.
Is there anyway I can get rid of the login prompt for the browser, and log them in automatically using the initial windows login they entered.
I would like to authenticate users using an LDAP query also.
View Replies
View Related
Can anyone direct me to some simple ASP code samples to do the following?
I'd like to, given a UID, check to see if an individual in a public
directory is part of a given OU.
I've noticed that for a given person there can be several OU's, so I don't
think it'd be possible to select an OU. However, can I select cn where UID
= xxx and OU = xxx and then check to see if it's not null? didn't know whether to put this in here or an LDAP group
View Replies
View Related
I am encountering an issue attempting to log into the LDAP. Here is the code:
Dim objBase, objContainer, objUser, strLDAPPath, strErrNum, iCounter
strLDAPPath = "LDAP://xxxx.xxxxxx.xxx.com:389/ou=Ebenefits, o=xxxxxx.xxx.com"
Set objBase = GetObject("LDAP:")
Set objContainer = objBase.OpenDSObject(strLDAPPath, "uid=HRISAdmin,ou=Directory Administrators,o=xxxxxx.xxx.com", "password", 0)
Set objUser = objContainer.GetObject("user", "uid=" & strUID)
The Set objUser line of code returns the following error:
Error -2147463164 An unknown directory object was requested
Any thoughts?
View Replies
View Related
I am trying to access ldap with standard ASP. The code works on the web server where I am developing but any other PC on network gets the following error:
Providererror '80040e37'
Table does not exist. /training/index.asp, line 41
Does anyone have any experience with this??
View Replies
View Related
I'm trying to get user details using ASP under IIS (Win2000) with the following code:
Set User = GetObject("WinNT://domainname/" & mid(strNTUser,8) & ",user")
strNTUserFullName= User.Fullname
The website this is running under uses Windows Authentication only no anonymous logins and this presumably is why I get the error 'General access denied error' from AD as the logged in user's credentials are not passed to the AD domain controller that is being queried for the users details.
how to I get this to work whilst keeping Windows Authentication?I only need the most basic details about the user so writing LDAP queries and creating recordsets etc seems like overkill and presumably the same problem will occur?
View Replies
View Related
I have a page which grabs data from Active Users which was working great last week. All of a sudden my code doesn't like some of the field names. For the purpose of keeping this short let's just say it's one field 'Department' Code:
Dim department
MyFullName = "FRED BLOGGS"
SQLStmt = "SELECT name,physicaldeliveryofficename,department " & _
"FROM 'LDAP://lvp-ad.myserver.wan' " & _
"WHERE objectClass = 'user' AND name='" & MyFullName &"'"
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "ADSDSOObject"
Conn.Open "ADs Provider"
Set rs = Conn.Execute(SQLStmt)
So, if i remove department all works fine. Any help appreciated.
View Replies
View Related
We need to use LDAP in conjunction with our ASP pages. Are there LDAP API
that can be used either from VB or VBScript ? Where can I find sample codes
for it ?
View Replies
View Related
how to add, remove,update user from ADS using ASP..all web has loaded with ASP.NET but i need help in just ASP.
I need full help what settings i need to make on my webserver as i wana remove user from ADS. How to write code in ASP to interact with ADS.
View Replies
View Related
how do i collect current user using ldap and asp, i want to know who's doing what, so when a page loads can i check who's logged in to the domain?
View Replies
View Related
Following code works fine, except that I have to hard-code the user's
fullpath (2nd parameter of the OpenDSObject() method). Code:
View Replies
View Related
I'm using the function copied below to authenticate users in LDAP before allowing them onto our intranet site. This works great! But what I'd like to do now is use the LDAP connection it creates to retreieve the users actual name.
I dont know how to do this so I've been looking for examples I can learn from on the net. I have found snipits of other people code but I've been tying myself in knots trying to fit them into my function and failing miserably.
Could anyone tell me what I need in the function below to get this information. From what I've seen I think I need to use some kind of filter on the LDAP object, but I dont know how to implement it. Code:
View Replies
View Related
I have a page in my Intranet with the contacts of the Active Directory.
My problem is when i want to sort contents. I only can order one field. In the example it is ordring by "Department". but those in same department came sorted by Object USN.
I want them ordered by name after ordered by Department. I tried "order by Department and order by name" but it do not work. Code:
View Replies
View Related
I have a number of applications that use a particular technique to
authenticate users using IWA and LDAP.
These are for intranet application where the users all use IE6, however I'm
trying to debug some javascript code and I find that easier to do with FF.
However my applications that use this authentication technique have problems
when running through FF.
I get an 'error '80072020' authuser.asp, line 20', which point to an LDAP
call: Code:
View Replies
View Related
Could someone please tell me what is going on here. If I hard code a username and password, the script works fine, but when I set the user name and password with a reqeust.form, I always get the invalid user notice. Then after getting that a couple of times, even hard coding the user name and password will cause the script to fail.
The error number it gives is 424.
<%@ Language = VBScript %>
<% option explicit %>
<%
dim UserName, Pswd, oADsObject, strADsPath, oADsNamespace
on error resume next
UserName = "test.acct"
Pswd = "access1"
strADsPath = "LDAP://cn=Users,dc=corp,dc=company,dc=com"
Set oADsObject = GetObject(strADsPath)
strADsNamespace = left(strADsPath, instr(strADsPath, ":"))
set oADsNamespace = GetObject(strADsNamespace)
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, UserName, Pswd, 1)
if not (Err.number = 0) then
response.write "Invalid Username or Password!"
else
response.write "Access Granted."
end if
set oADsObject = nothing
set oADsNamespace = nothing
%>
View Replies
View Related
I am trying to access a LDAP server with ASP with no sucess. I can do it with ColdFusion but not ASP. All the examples I have seen so far do not use passwords or userid's. My LDAP server requires password and user credentials. Can anyone point me in the right direction.
View Replies
View Related
How I can connect to non-Microsoft LDAP-server and select record from him ? With best regards, Aleksandre Skornitchenko.
IT Dept., Togliatti Branch
MegaFon
E-mail: Join Bytes!
ICQ: 7829547
View Replies
View Related
I'm trying to build a page that looks up users based on CN or SN and returns specific information - IE fullname, phone, email etc - I can get the look up to work, but so far the only information I can spit out is:
cn=HAR,ou=CATS,ou=EMPL,ou=CONT,o=COName
some information and sample code that will allow me to display this info?
View Replies
View Related
I'm porting some code over to use ADS for user data lookup, but can't find a clear reference anywhere to the old windows 2000 userid (the network login). Does it still exist within LDAP, or will I have to match to sn & givenName?
View Replies
View Related
Is it possible to find, and display a pc name in an asp web page using vb.
View Replies
View Related