it doesnt display anything from anyother system

hi everyone,

I am getting user information from active Directory(AD).

it works very good from my system(PC).but if i try from any other system(PC) of our network.it doesnt display anything.

I have a complete application in my localhost under inetpub/wwwroot.

now i am trying to run this application from different computer. as like http://bhuraa/intraApp/ where bhuraa is my computer name and IntraApp is application name.It starts application but doesnt display my information.which i get from my PC(System).

code is given below.

please help me.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

lblmail.Text = GetUserInfo(Request.ServerVariables("REMOTE_USER"), "mail")

end sub

Public Function GetUserInfo(ByVal inSAM As String, ByVal inType As String) As String
Try
Dim sPath As String = "LDAP://RCJY01DC01"
Dim SamAccount As String = Right(inSAM, Len(inSAM) - InStr(inSAM, "\"))
Dim myDirectory As New DirectoryEntry(sPath)
Dim mySearcher As New DirectorySearcher(myDirectory)
Dim mySearchResultColl As SearchResultCollection
Dim mySearchResult As SearchResult
Dim myResultPropColl As ResultPropertyCollection
Dim myResultPropValueColl As ResultPropertyValueCollection
'Build LDAP query
mySearcher.Filter = ("(&(objectClass=user)(samaccountname=" & SamAccount & "))")
mySearchResultColl = mySearcher.FindAll()

Select Case mySearchResultColl.Count
Case 0
Return "Null"
Exit Function
Case Is > 1
Return "Null"
Exit Function
End Select

mySearchResult = mySearchResultColl.Item(0)

myResultPropColl = mySearchResult.Properties
myResultPropValueColl = myResultPropColl.Item(inType)
Return CStr(myResultPropValueColl.Item(0))

Catch ex As System.Exception

End Try
End Function

waiting for poisitve reply.

ASIF
[2428 byte] By [bhuraasif] at [2007-11-20 11:34:41]
# 1 Re: it doesnt display anything from anyother system
Did you/do you need to configure ODBC settings on the other machines. To me, this doesn't sound like a code issue, but a computer configuration issue.
PeejAvery at 2007-11-9 11:54:08 >