I am very green on asp.net. Learning as I go. What I am trying to do is create a helpdesk support from on our intranet that will send an email to our ticketing system that automatically generates a ticket. I have created a form, and it works, but the issue I am running into is that our ticketing system only recognizes a user's primary smtp address, or the mail attribute from LDAP. All others get thrown out. The form I created has an input field for email address. I already know that users will enter an incorrect email address. I would like for the form to automatically pull the user’s mail attribute from LDAP. The form will be on a intranet website with Anonymous access off and Integrated Windows authentication on. I have attached the files I currently have. Any help would be greatly appreciated.
'would also work and saves you some code
searcher.Filter =
"(&(anr=jagjot)(objectCategory=person))"
Dim results As SearchResultCollection
results = searcher.FindAll()
Dim result As SearchResult
For Each result In results
Me.eName.Text = result.Properties("cn")(0)
Me.eMail.Text = result.GetDirectoryEntry.Properties.Item("mail").Value
Me.eEmpNo.Text = result.GetDirectoryEntry.Properties.Item("employeeID").Value
Me.ePhone.Text = result.GetDirectoryEntry.Properties.Item("telephoneNumber").Value
Me.eLocation.Text = result.GetDirectoryEntry.Properties.Item("department").Value
Me.eEtc.Text = result.GetDirectoryEntry.Properties.Item("PhysicalDeliveryOfficeName").Value
Me.eTitle.Text = result.GetDirectoryEntry.Properties.Item("title").Value
Next
i ran queries with system.directoryservices and system.management for active directory and wmi back in 2003 and 2004. i pulled out ou's and groups from active directory, and the really hard part is coming out with ldap expression that goes in .filter property. if you prefer to use sql for active directory, you can use adsi, but it would be as a com object from dotnet.
Bookmarks