LDAP Request Help - Please Please Please!!!

My head is about to fly off my neck and shoot through the ceiling!  Ive been trying to make the following code work for weeks, and I cannot figure it out.  The code is located at this website: http://v5.beta.docutek.com/eres/custom/fresnoLDAP.aspx.  Everytime I try to run this sub I get the following error:

"Unknown error (0x80005000)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Unknown error (0x80005000)"
Can someone try to fashion a request to my server using their code and let me know if they can get anything back. Or maybe you can try running my code from your server to see if you can get anything...Im at a loss!

sub handleLogin4(sender As Object, e As System.Web.UI.ImageClickEventArgs)
Dim ds As New DirectorySearcher
Dim resultset As SearchResultCollection
Dim result As SearchResult
Dim ResultFields() As String = {"securityEquals", "cn"} 'Return the securityEquals field and the cn field
With ds
'Set the container I want to search
.SearchRoot = New DirectoryEntry("LDAP://titan.cvip.net/ou=facstaf,ou=CSUF,o=cvip.net")

'Use the array set above for return fields
'.PropertiesToLoad.AddRange(ResultFields)

'Set a filter/query
'.Filter = "cn=ad*"
End With

resultset = ds.FindAll()
If resultset.Count > 0 Then
For Each result In resultset
response.write("Found: " & result.Properties("securityEquals")(0) & "<BR>")
Next
Else
'No results
response.write("No Data Found")
End If
End Sub
0
marcbertone
12/13/2004 6:24:56 PM
asp.net.active-directory-ldap 2291 articles. 0 followers. Follow

5 Replies
902 Views

Similar Articles

[PageSpeed] 36

You probably need to specify a valid username and password before making the call:

entry.Username = "someaccount@domain.com"
entry.Password = "password"
Darrell Norton, MVP
Darrell Norton's Blog


Please mark this post as answered if it helped you!
0
DarrellNorton
12/13/2004 7:13:58 PM
Hi Darrell,

I was told that this server allows for anonymous requests...so I dont think that will make a difference. I wish that was it though!
-Marc
0
marcbertone
12/13/2004 8:00:24 PM
What is it exactly that you are trying to do here?  Are you trolling through ldap or using ldap commands to talk to AD?  Your LDAP server allows anonymous requests?  That would be unusual.

Those who say it can not be done, should not interrupt those who are doing it!
0
jrandomuser
12/13/2004 8:36:44 PM
The plan is that I want to restrict access to my website to a list of people defined on a Sun server with a LDAP implementation.  So whenever someone tries to load my website I check to see if they have a cookie, and if they dont I redirect them to the query page at http://v5.beta.docutek.com/eres/custom/fresnoLDAP.aspx.  On submit I will send a LDAP request that contains the username and password, and see if there is a match.  I havent added this part yet since I cant even get the basic request to work...but once I can get some response from the server Ill try to plugin the username/password info.

Is there a better way to protect a website with information stored on someone else LDAP enabled server? Im wondering if something in web.config could handle this, or maybe an easy to use ISAPI filter?
0
marcbertone
12/13/2004 9:01:55 PM
Sun LDAP servers and ADSI don't really get along that well...

However, it seems to be the case that you can only bind anonymously to search when the LDAP is a Sun implementation - so you should be good there.
A couple things:
1. Inspect the .InnerException from that COMException to see if there is more useful information.
2. Try using the AuthenticationTypes.Anonymous to see if that will help - Right now, it defaults to .None I believe.
Ryan Dunn
Weblog
The Book
LDAP Programming Help
0
dunnry
12/13/2004 10:40:22 PM
Reply:

Similar Artilces:

iFolder and Active Directory LDAPS (LDAP over SSL)
I am looking for some insight in getting my iFolder server communicating with an Active directory server over SSL for user Authentication. I am using iFolder 2.1.3 and Windows 2003SP1 on the servers for both iFolder server OS and Active Directory OS. I have installed the root cert for the domain on the iFolder server. When I use the iFolder installer I can extend the schema of the directory structure over 636 using SSL without any problems, it connects and looks good. When iFolder starts the logfile has the following entries Starting iFolder server, version 2.1.3 [04/06/01] Conf...

Net::LDAP, Active Directory and Disabled Users
------_=_NextPart_001_01C386CB.502F3B30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've been trying to write a simple perl script that will query the = active directory via LDAP and give me a list of email addresses for disabled = users (eg, addresses we don't want to accept email for anymore). I found a = website or two that suggested I use the following as my filter: (&(objectCategory=3Dperson)(userAccountControl:1.2.840.113556.1.4.803:=3D= 2)) I was beginning to think these websites were wrong as whene...

4 issues with Net::LDAP and Active Directory
------_=_NextPart_001_01C74A47.D441C220 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have 4 issues which I do not understand and I have searched the Net::LDAP documentation up and down and cannot figure it out. =20 1. pwdLastSet is only available for the DN of the user who is logged in. (That seems a little odd, why is that?) and yes I logged in as another user using LDAP and it was available for them and not me. =20 2. pwdLastSet is some Active Directory timestamp (Why oh why cant Microsoft just use utc like ev...

READ ME: Where to find Active Directory LDAP Help
For various reasons, some I won't mention, I have been forced to stop my participation in this forum.  I very likely will not be monitoring my 1800+ threads and or responding to them anymore in this forum.  Unfortunately, that means that a lot of questions will likely go unanswered in this forum (or answered incorrectly).  The good news is that you can still ask your questions and be virtually guaranteed of a high quality answer.  You just need to post it to http://directoryprogramming.net in the forums section.  There are lots of good threads here on this forum...

make Net::LDAP::LDIF more similar to Net::LDAP
Hi Graham, hi Chris, hi list, I would like to rework Net::LDAP::LDIF a bit so that its API resembles that of Net::LDAP a bit more while still keeping the traditional API. The reason for this is that in application I often need to distinguish between Net::LDAP and Net::LDAP::LDIF because some methods are only implemented on one side. I\'d like to start with a code() method that tries to mimic the Net::LDAP one and I\'d like to extend the Net::LDAP::Entry->update() method so that it takes a Net::LDAP::LDIF object as an argument. The latter one requires a...

RE: Net::LDAP, Active Directory and Disabled Users
Version of Perl:=20 5.8.0 (as supplied with RedHat9) Version of Net::LDAP: [jsteenha@jake utilities]$ perl -mNet::LDAP -e 'print = "$Net::LDAP::VERSION\n"' 0.29 Relevant part of Perl code: #!/usr/bin/perl use Net::LDAP; use Net::LDAP::Filter; $filter =3D = '(&(objectCategory=3Dperson)(userAccountControl:1.2.840.113556.1.4.803:=3D= 2))'; #$filter =3D '(objectCategory=3Dperson)'; $f =3D new Net::LDAP::Filter; $f->parse($filter); $f->print(); #exit; my $ldap =3D Net::LDAP->new('acutex-dc01'); my $mesg =3D $...

Net::LDAP, Active Directory and Disabled Users #2
I've been trying to write a simple perl script that will query the active directory via LDAP and give me a list of email addresses for disabled users (eg, addresses we don't want to accept email for anymore). I found a website or two that suggested I use the following as my filter: (&(objectCategory=person)(userAccountControl:1.2.840.113556.1.4.803:=2)) I was begining to think these websites were wrong as whenever I tried this filter, I'd go no results. With other filters, I'd get the results I'd expect to get. I then tried that filter in a couple other appli...

superreview requested: [Bug 332483] LDAP userCertificate requests fail for ldap servers that require auth : [Attachment 219790] support login and password for cert certificate ldap searching
Scott MacGregor <mscott@mozilla.org> has asked David Bienvenu <bienvenu@nventure.com> for superreview: Bug 332483: LDAP userCertificate requests fail for ldap servers that require auth https://bugzilla.mozilla.org/show_bug.cgi?id=332483 Attachment 219790: support login and password for cert certificate ldap searching https://bugzilla.mozilla.org/attachment.cgi?id=219790&action=edit ------- Additional Comments from Scott MacGregor <mscott@mozilla.org> trying david. ...

Help Translating Cold Fusion LDAP Request to VB.NET
Hi everyone, I have the following Cold Fusion code that I need to translate to VB.net. Ive tried to write this 3 or 4 different ways, but I cant seem to make any of it work properly. Im hoping someone out there can plug my server info into their code and send me the results. Any help would be great...this problem has been bugging me for weeks!! COLD FUSION CODE FOLLOWS... <!--- <CFSETTING ENABLECFOUTPUTONLY="No" SHOWDEBUGOUTPUT="No"> ---> <CFIF IsDefined("attributes.username") and IsDefined("attributes.password")> ...

Help with Active Directory as LDAP for Bugzilla 2.18.1
This is a multi-part message in MIME format. ------_=_NextPart_001_01C56C58.829A00E5 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have successfully built Bugzilla V 2.8.1 on a Windows 2003 server following the great set of instruction provided by Byron Jones at http://www.bugzilla.org/docs/w-in32install.html <http://www.bugzilla.org/docs/win32install.html> =20 Now I'm trying to set it up to use our active directory for authentication using the instruction at: http://groups-beta.google.com/-group/netscape.public...

[Fwd: make Net::LDAP::LDIF more similar to Net::LDAP]
--------------95D5815B06BDC2BD1A0ABFEB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit --------------95D5815B06BDC2BD1A0ABFEB Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mozilla-Status2: 00000000 Message-ID: <40C7B13E.8864E5A0@cs.adelaide.edu.au> Date: Thu, 10 Jun 2004 10:54:22 +1000 From: Sion Camilleri <sion@cs.adelaide.edu.au> Reply-To: sion@cs.adelaide.edu.au X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Graham Barr <gbarr@pobox.com>...

Help with: Active Directory, LDAP, DirectoryServices, binding string, ADsPath, etc...
I searched and tried different things for the last 2 days, so now I ask...  What I am working with: ASP.NET 2.0, VB.NET and developing on a intranet with that users will be logged into using Active Directory (we are a strickly Microsoft shop). I have got as far as pulling a user's name (user.identity.name) and checking if they are in a paticular group (user.isinrole("Best Group Ever")). I want to be able to: pull users real name (not doej, but John Doe), email address (we use Outlook), pull users per group, etc... I have tried using DirectorySerices with things like: ...

Net::LDAP -> Active Directory password change attribute failure
Okay, even using the code chunk from "the FAQ"(tm), trying to have a user change their own password results in the error message: 0000052D: AtrErr: DSID-03190F00, #1: 0: 0000052D: DSID-03190F00, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 9005a (unicodePwd) from the $ldap->modify( changes=>{delect,add} ) operation. Have tried numerous methods of encoding the password unicode (which all end up the same result) as well as base64 encoding. Strangely, if I use a "replace" operation instead of changes=>{delect,add}, it is accepted (tho i g...

Fw: Re: make Net::LDAP::LDIF more similar to Net::LDAP
Am 08.06.2004 um 18:29 Uhr haben Sie geschrieben: > On 8 Jun 2004, at 16:56, peter@adpm.de wrote: > > I\'d like to start with a code() method that tries to mimic the >> Net::LDAP one and >I assume you mean better error handling ? My first goal is having a code() method in Net::LDAP::LDIF. > > I\'d like to extend the > > Net::LDAP::Entry->update() method so that it takes a > > Net::LDAP::LDIF object as an argument. The latter one > > requires a bit of work in Net::LDAP::LDIF to make it > > correct. > Not su...

Net::LDAP v0.28, bug in Net::LDAP::Constant, :all not supported
Net::LDAP::Constant no longer supports the :all tag in the export list due to the switch from Exporter to a manual export routine. So, while the following: perl -MNet::LDAP::Constant=:all -e 1 worked fine in 0.2701, it now dies with the error: ":all" is not exported by the Net::LDAP::Constant module at -e line 0 Can't continue after import errors at -e line 0 BEGIN failed--compilation aborted, <DATA> line 197. The documentation for Net::LDAP::Constant still documents the ':all' tag. I am not subscribed to the list, so if some...

Web resources about - LDAP Request Help - Please Please Please!!! - asp.net.active-directory-ldap

Pelosi: Going After Bill Clinton Would Be Fair Game If He Were Running, ‘But He Isn’t’
Plenty of people think that Bill Clinton ‘s personal history and past accusations of sexual assault are fair game on the campaign trail–– Hillary ...

David Margulies, ‘Ghostbusters’ Mayor, Is Dead At 78 – Cause Of Death Unknown
David Margulies, veteran character actor, has died on Monday , January 11, 2016, Broadway World reports. The cause of his death is currently ...

iOS 9.3 Preview: First look at Night Shift mode, Touch ID Notes, new 3D Touch quick actions, much more ...
This week’s iOS 9.3 beta software update for iPhone and iPad is a pretty major release for a mid-cycle version. New features including the F.lux-like ...

Istanbul Suicide Bombing Kills at Least 10; Turkey Blames ISIS
The Turkish government said that the Islamic State was behind the attack in the district of Sultanahmet, and that the dead were all foreign citizens. ...

Monte Irvin, Star Outfielder Who Lost His Prime to Racism, Dies at 96
New York Times Monte Irvin, Star Outfielder Who Lost His Prime to Racism, Dies at 96 New York Times Monte Irvin, the New York Giants outfielder ...

Jeff Long Stepping Down as Chairman of College Football Playoff Selection Committee
Arkansas athletic director Jeff Long is stepping down from his role as chairman of the College Football Playoff selection committee next year, ...

Katy Perry Gets Flirty At Golden Globes After Party With Orlando Bloom?
Katy Perry was spotted getting flirty with a certain someone at the Golden Globes after partys. The “Dark Horse” singer let all hang out in a ...

Fox Business Network Demands That You Play Powerball and Lose
Earlier today a Fox Business Network yapper dared point out that there is absolutely no way you will ever win the lottery, because you won’t, ...

Murdoch, Hall engagement sparks mockery on social media
The news of Rupert Murdoch's engagement to Jerry Hall sent social media into a sometimes snarky whirl on Tuesday, as Twitter users mocked the ...

Tesla Model S Adds ‘Summon,’ Elon Musk Calls Out Apple On Self-Driving Cars
Tesla founder Elon Musk is convinced self-driving car technology will be ready within three years. In fact, the billionaire innovator believes ...

Resources last updated: 1/12/2016 10:44:34 PM