473,499 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DirectoryServices Update AD property

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

May 31 '06 #1
2 1401
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" <dx*@mms.co.uk> wrote in message
news:eb**************@TK2MSFTNGP02.phx.gbl...
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

May 31 '06 #2
Yes to all of those!!
"Winista" <na*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
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" <dx*@mms.co.uk> wrote in message
news:eb**************@TK2MSFTNGP02.phx.gbl...
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


Jun 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
9588
by: hykim | last post by:
Hello, everyone. according to MSDN, there is any constructor of System.DirectoryServices.SearchResultCollection Class. if I implement DirectorySearcher.FindAll() method by myself, then how can I...
3
12308
by: Big Dave | last post by:
Hello All, I was wondering wether anyone could help me solve what is probably a very easy issue. I keep getting this damn "The administrative limit for this request was exceeded" whenever I try to...
1
4844
by: Stephanie Stowe | last post by:
Hi. I am trying to read information out of the IIS metabase (v5.1). Observe the following code: using System; using System.DirectoryServices; using System.Reflection; namespace ADSI1 {...
0
2917
by: news.microsoft.com | last post by:
Greetings, I am building a ASPX UI that will allow a HR representative manage the AD Organization. I have a class that wraps a lot of AD work and I do things like change password and update the...
7
2910
by: turbon | last post by:
Hello, I am writing code, which will copy webServices from one IIS 6.0 webserver to another and using DirentoryServices to achieve this purpose. And I have problems with authentication - I get an...
1
996
by: Davie | last post by:
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...
6
5444
by: bugnthecode | last post by:
Hi, I'm building a small desktop app in VS Std 2005 with C# and .net 2.0. I've managed to get the code together to query the ldap my company has, but every time I attempt to access a specific...
5
21150
by: Peter Bradley | last post by:
I'm trying to use System.DirectoryServices to update Active Directory from a Web Service. When I try to commit the changes, I get the following error message: "A constraint violation occurred....
4
2608
by: Brandon McCombs | last post by:
Hello, From my understanding, DirectoryEntry is used to connect to Active Directory. Although this makes no sense whatsoever I accept it. The problem is how am I supposed to test whether a...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.