Modifying Active Directory with ASP.Net

D

Derek Martin

This seems to be a common problem in ASP.Net:

Try
Dim mystuff As DirectoryEntry = Session("myDirectoryEntry")
mystuff.Properties("extensionAttribute1")(0) = "yes"
mystuff.CommitChanges()
Catch ex As Exception
label1.Text = "this happens quite a bit"
End Try

Exception:
?ex
{System.Runtime.InteropServices.COMException}
[System.Runtime.InteropServices.COMException]:
{System.Runtime.InteropServices.COMException}
HelpLink: Nothing
InnerException: Nothing
Message: "The server is unwilling to process the request."
Source: "System.DirectoryServices"
StackTrace: " at System.DirectoryServices.Interop.IAds.SetInfo()
at System.DirectoryServices.DirectoryEntry.CommitChanges()
at groupsearcher.searcher.Button2_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\groupsearcher\searcher.ascx.vb:line 210"
TargetSite: {System.Reflection.RuntimeMethodInfo}

Googles of "The Server is unwilling to process the request." seem to be
abundant but can't seem to find any solutions? I am running the ASP.Net
application with impersonation using a user that is able to do the commit
(it works in a Windows App just fine (replacing Session calls with Global
calls)).

Anyone???

Thanks!

Derek

PS - The myDirectoryEntry is of type DirectoryEntry obtained from a
SearchResult in another function.
 
D

Derek Martin

If anyone was curious, I found a solution. I was using GC:\\ in the query
path for the new directory entry when searching and should have been using
LDAP:\\

Derek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top