PC Review


Reply
Thread Tools Rate Thread

DirectoryServices Update AD property

 
 
Davie
Guest
Posts: n/a
 
      31st May 2006
I have the following code for updating the secretary field in AD using
VB.NET 2005. However, I get a rather unhelpful 'Unspecified error' when i
try to set the property. Any help would be greatly appreciated.

Dim usr As New DirectoryEntry(personDistinguisedName, adminUserName,
adminPassword)
usr.Properties("secretary").Value = secretaryDistinguisedName
usr.CommitChanges



 
Reply With Quote
 
 
 
 
Winista
Guest
Posts: n/a
 
      31st May 2006
Couple of things to check..

1. You spelled the property name correctly.
2. Your account has permissions to update the field
3. And see if this AD field exists.

"Davie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have the following code for updating the secretary field in AD using
> VB.NET 2005. However, I get a rather unhelpful 'Unspecified error' when i
> try to set the property. Any help would be greatly appreciated.
>
> Dim usr As New DirectoryEntry(personDistinguisedName, adminUserName,
> adminPassword)
> usr.Properties("secretary").Value = secretaryDistinguisedName
> usr.CommitChanges
>
>
>



 
Reply With Quote
 
Davie
Guest
Posts: n/a
 
      1st Jun 2006
Yes to all of those!!


"Winista" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Couple of things to check..
>
> 1. You spelled the property name correctly.
> 2. Your account has permissions to update the field
> 3. And see if this AD field exists.
>
> "Davie" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I have the following code for updating the secretary field in AD using
>> VB.NET 2005. However, I get a rather unhelpful 'Unspecified error' when
>> i
>> try to set the property. Any help would be greatly appreciated.
>>
>> Dim usr As New DirectoryEntry(personDistinguisedName, adminUserName,
>> adminPassword)
>> usr.Properties("secretary").Value = secretaryDistinguisedName
>> usr.CommitChanges
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DirectoryServices and ObjectClass property Jeroen Microsoft C# .NET 4 22nd May 2007 05:20 PM
DirectoryServices Property Update Davie Microsoft Dot NET 1 5th Jul 2006 08:43 PM
System.DirectoryServices ProxyAddresses property =?Utf-8?B?Qm9uaQ==?= Microsoft Dot NET Framework 2 20th Jul 2005 06:30 AM
Cannot Single out one Property using System.DirectoryServices =?Utf-8?B?bWJvd2Vyc294?= Microsoft Dot NET Framework 0 24th May 2005 02:51 PM
DirectoryServices : pb with property memberOf BlackGoddess Microsoft Dot NET Framework 6 29th Jul 2004 09:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:20 PM.