Archive for the 'Development' Category

Deleting LDAP Entries

Thursday, August 14th, 2008

Following on from my popular post on searching LDAP directories I thought I’d follow up with a simple piece of code that allows you to delete entries.

There are two ways to remove an entry. The first way is to search for a node an remove it, along with all of its children. The second way is to search for a node and remove one or more of its children. (more…)

Working With LDAP In VB.Net

Friday, June 13th, 2008

I wrote a post a while ago dealing with an error that VB can throw when dealing with an LDAP connection, you can find it here. Because this post has proved popular with people searching for the error code on Google, I thought I’d put together a quick post on using LDAP in VB.Net.

(more…)

Windows Live Writer Plugin

Monday, June 9th, 2008

I have recently created my first Plugin for Windows Live Writer. I’m starting off simple with a Plugin that allows you to add Amazon affiliate links to your posts. It works with Amazons Quick Linker Widget which needs to first be added to your pages (in the footer).

I have submitted it the Windows Live Gallery, but I have no idea how long the submission process takes.

My Plugin and its details can be found here.

Tags:

AJAX Tutorials

Thursday, May 22nd, 2008

I found this very good article that has links to 30 of the best AJAX tutorials around. It covers things from drag and drop to lists, as well as the basics of AJAX.

Designs Advice

reCAPTCHA

Monday, January 7th, 2008

I recently added a contact page to my site. To do this I used a wordpress plug in,  Dagon Design. Its a very good plug in by the way. It allows you to prevent spam by adding a reCAPTCHA image to the form. I’ve always known about reCAPTCHA helping to digitise books where OCR is not working, but I have always wondered how the system knows you are correct, if the word cannot be read by computers.

After I signed up for my free account at recaptcha.net I read about how it works.

Each new word that cannot be read correctly by OCR is given to a user in conjunction with another word for which the answer is already known. The user is then asked to read both words. If they solve the one for which the answer is known, the system assumes their answer is correct for the new one. The system then gives the new image to a number of other people to determine, with higher confidence, whether the original answer was correct.

You can read more about it here.

Tags:

System.DirectoryEntry - Adding new objects

Monday, September 3rd, 2007

I have recently been playing around with Apaches Directory Service, creating custom schema types and the like but came across a problem.

In VB.Net if I tried to add a new child to a directory entry, of a custom schema type (in this case in inherited from the person class) it would throw an exception when I tried to commit changes. On closer inspection I noticed that instead of creating an object of my custom schema class, it was trying to create an object of the person class, and the error being thrown by the LDAP server was because some of the properties I was trying to set did not exist for the Person class.

I managed to get around this by adding a property ‘objectClass’ and setting the value to the type of my custom schema class. This means that when I call commit changes, the LDAP server can validate it against that class.

AddUpdateProperty(newUser, "objectClass", "myUserClass")
AddUpdateProperty(newUser, "mail", user.Email)
AddUpdateProperty(newUser, "uid", user.ID)

Technorati Tags: , ,

System.DirectoryEntry Unknown error (0×80005000)

Friday, August 31st, 2007

I have recently encountered this really unhelpful error message in VB.Net whilst trying to code a connection to an LDAP server.

After much head banging I found the solution! It’s all down to the path you supply to the constructor:

Old Connection (doesn’t work):

Using dir As New DirectoryEntry(ldap://yourserver:port)
	' Your Code
End Using

New Connection (does work):

Using dir As New DirectoryEntry(LDAP://yourserver:port)
	' Your Code
End Using

Spot the difference? That’s right! the protocol part (LDAP) is case sensitive. Changing to uppercase works like a charm.

Update: I have posted an article and sample code on working with LDAP here.

Technorati Tags: , , ,