|
|
|
date: 19 Apr 2005 05:59:40 -0700,
group: microsoft.public.platformsdk.adsi
back
Re: "COMException (0x80004005): Unspecified error" when creating a user in AD via Web Service
Hallo Marc,
> I would think it's a security issue - when you're running it locally
> on Windows directly, it's being executed under your own account, which
> most likely has enough privileges to create the user.
>
> When you do it through the web service, you run it as the "anonymous"
> ASP.NET user which by default most likely won't have the permissions
> to do this.
I changed the identity of the Web Service Application Pool in IIS to a
user with administrative privileges. By the way this is exactly the
same user account who executed the local Windows application
successfully.
> So when you bind to AD, you will need to supply credentials (username
> and password) that are sufficiently priviledged to be able to create
> users. You can do this in the "new DirectoryEntry()" constructor -
> check it's overloads.
I already tried this:
userList = new DirectoryEntry("LDAP://myServer/CN=Users,DC=myDomain,DC=de",
"adminUsername", "adminPassword");
as well as:
userList = new DirectoryEntry("LDAP://myServer/CN=Users,DC=myDomain,DC=de",
"adminUsername", "adminPassword", AuthenticationTypes.Secure);
Still no success. For "adminUsername" I tried:
adminUsername
domain\adminUsername
adminUsername@domain.de
in all cases (with and without passing credentials to the
DirectoryEntry() constructor) I receive the same exception.
In IIS manager anonymous access is disabled and "Integrated Windows
authentication", "Digest authentication" and "Basic authentication"
are enabled.
Any other ideas?
Regards
Frank Wehner
date: 20 Apr 2005 00:46:21 -0700
author: (Frank Wehner)
|
|