Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
Public Function GetUserInfo(ByVal inSAM As String, ByVal inType As String) As String Try Dim sPath As String = "LDAP://MYDOMAIN.co.uk/OU=Staff,DC=MYDOMAIN,DC=co,DC=uk" Dim SamAccount As String = Right(inSAM, Len(inSAM) - InStr(inSAM, "\")) Dim myDirectory As New DirectoryEntry(sPath, "MYACC", "MYPASS") Dim mySearcher As New DirectorySearcher(myDirectory) Dim mySearchResultColl As SearchResultCollection Dim mySearchResult As SearchResult Dim myResultPropColl As ResultPropertyCollection Dim myResultPropValueColl As ResultPropertyValueCollection 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 pnlNonUser.Visible = True pnldisplay.Visible = False pnlsubmitted.Visible = False End Try End Function Dim sManager As String = GetUserInfo(UserId, "manager") lblManager.Text = sManager
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.