AD Crossover?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hiya all, (one of) my problem is that I have created a web part that allows the current user to change their account password from sharepoint portal 2003 which works fine (sortof), in that it will connect via directory services to the LDAP server that is specified in the connection string. Unfortunatly when I try the same code in a web application, it comes up saying that it cannot connect to the server and when I explicitly specify a server it comes up as an invalid path (0x80005000). I should mention that the main server that hosts sharepoint is running Window Server 2003 and is also the domain controller, while the web application is being hosted on a Windows Server 2000 development machine using a default install (web hosting but not a domain controller)

Is the web application having troubles because it is looking at the 2000 machine for directory information? or is there something else that I am missing entirely? What do I need to do to have the web application show me directory information without moving my development programs/stuff to the main server? Can anyone please help me with this?
 
Gary K said:
Hiya all, (one of) my problem is that I have created a web part that
allows the current user to change their account password from sharepoint
portal 2003 which works fine (sortof), in that it will connect via
directory services to the LDAP server that is specified in the connection
string. Unfortunatly when I try the same code in a web application, it
comes up saying that it cannot connect to the server and when I explicitly
specify a server it comes up as an invalid path (0x80005000). I should
mention that the main server that hosts sharepoint is running Window
Server 2003 and is also the domain controller, while the web application
is being hosted on a Windows Server 2000 development machine using a
default install (web hosting but not a domain controller).

Is the web application having troubles because it is looking at the 2000
machine for directory information? or is there something else that I am
missing entirely? What do I need to do to have the web application show me
directory information without moving my development programs/stuff to the
main server? Can anyone please help me with this?

Hard to tell without showing some code.

Willy.
 
Sorry, been away for a couple of days (the car broke, honest!). This is the function I use to give me a DirectoryEntry object that relates to the currently logged in user, from Sharepoint. The only bits that change when I use it in a local web app on the development machine are the first few lines that get the account login name, in the web app I just pass it as a parameter (and the label control changes name to lblMsg). Oh, I've removed the server name (computer.domain.group.country format) and replaced it, to prevent spamming/dos/etc & you can safely ignore the variable 's' as it was only used for debuging. Also, the error occurs when doing the FindAll, and yes, I have tried creating a DirectoryEntry using a LDAP string for the SearchRoot property, same problem

Private Function FindUser() As DirectoryEntr
Dim s As String = "
Tr
Dim u As SPUse
Dim ds As DirectorySearche
Dim src As SearchResultCollectio
Dim de As DirectoryEntr

u = SPControl.GetContextWeb(Me.Context).CurrentUse
ds = New DirectorySearcher(
ds.SearchRoot = Nothin
ds.Filter = "(&(objectClass=user)(samAccountName=" & u.LoginName.Substring(u.LoginName.IndexOf("\") + 1) & "))
ds.PropertiesToLoad.Add("DistinguishedName"
src = ds.FindAll(
If src.Count <> 1 The
lblMessage.Text = "Unable to locate your unique account record.
Return Nothin
End I
s = "LDAP://<servername>/" & src(0).Properties("DistinguishedName")(0
de = New DirectoryEntry(s
Return d
Catch e As Exceptio
lblMessage.Text = "Exception Error:<BR>" & e.Message & "<BR>" & e.StackTrac
Return Nothin
End Tr
End Function
 
Back
Top