473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Adding an external associated account to an active directory object

Hi,

i want to add an extern associated account to an mailenabled ad
object. everthing works fine (i'm working with vb.net 2008 express)
but saving produces an error.

both lines:
objExMbx.InvokeSet("msExchMasterAccountSID", RawSid)
objExMbx.InvokeSet("msExchMailboxSecurityDescripto r", objSD)

lead to an exception (in german)
Unbehandelte Ausnahme: System.Reflection.TargetInvocationException:
Ein Aufrufziel hat einen Ausnahmefehler verursacht.
---System.Runtime.InteropServices.COMException (0x80004005): Beim
Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL
-Fehler zurückgegeben.
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.DirectoryServices.DirectoryEntry.InvokeSet( String
propertyName, Object[] args)
bei SetMSExternalAccount.Main.Main() in C:\Dokumente und
Einstellungen\user\Eigene Dateien\Visual Studio 200
8\Projects\SetMSExternalAccount\SetMSExternalAccou nt\Module1.vb:Zeile
300.

RawSid is "Dim RawSid as IntPtr" and the sid is converted via
ConvertStringSidToSid

Declare Auto Function ConvertStringSidToSid Lib "advapi32.dll" ( _
ByVal StringSid As String, _
ByRef Sid As IntPtr) As Long

and objSD is "Dim objSD As ActiveDs.SecurityDescriptor"

i checked the contents of the SD which is:
NT-AUTORITÄT\SELBST, 131075, 0, 2, 0, ,
NT-AUTORITÄT\SELBST, 131075, 0, 2, 0, ,
TOPTEST\user, -2147418107, 0, 0, 0, ,
and is correct. where am i wrong?

Regards, Dirk
Jul 12 '08 #1
0 796

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

Similar topics

9
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
4
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet...
4
by: Dmitry Korolyov [MVP] | last post by:
When we use btnSubmit.Attributes = "javascript: this.disabled=true;" to make the button disabled and prevent users from clicking it again while form data still posting, there is no longer...
0
by: jakobsgaard | last post by:
It is possible to Map a certificate to a Active Directory User Account from DotNet? Please provide an example. Best regards, Ejnar Jakobsgaard...
0
by: John Wright | last post by:
I want to get an account status in Active Directory (Active, Inactive, Disabled) using Active Directory. Using the code that follows, I can validate the account is active, but if the account is...
4
by: cpajoe2001 | last post by:
I am not sure if this is the proper place to put this thread but I have run into a road block. I am writing a web app that will create groups in Active Directory then add users to those groups. I...
5
by: Chris Noble | last post by:
A user account expiration date can be set using the following code // Use the DirectoryEntry.InvokeSet method to invoke the // AccountExpirationDate property setter. usr.InvokeSet(...
10
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
I am trying to setup ASPNET account for .NET application to access database (SQL Server 2000) by aspnet_regiis -i in the directory C:\WINNT\Microsoft.NET\Framework\v1.1.4322 After running it, I...
3
by: robboll | last post by:
I am working on a form where one of the checkboxes asks if there is a document associated with the record? If you user clicks to check it (i.e., "Yes"), I would like these events to occur: 1. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.