Component Almost Working

Results 1 to 2 of 2

Thread: Component Almost Working

  1. #1
    Join Date
    Dec 1969

    Default Component Almost Working

    I have created a component, that queries our corporate exchange server for information specific for a particular uid. From there, I compiled the code in a component to be used in our intranet. <BR><BR>However, when trying to use the component (which successfully compiled and is registered with the .net project) I was getting an invalid path problem. I then tried adding a username and password to the connection string connecting to the exchange server. <BR><BR>This alleviated the error message, however this is a hack solution. I want the asp page to be able to connect to the exchange server without needing a username and password and retrive any employee&#039;s information.<BR><BR>Why, when connecting from, I didn&#039;t have to specify a username and password, and the functionality worked perfectly? And now, when connecting from via a compiled component, I have to? Is there a setting in IIS or a workaround in that I need to use to not need the authentication?<BR><BR>Thanks in advance.<BR><BR>********************************** ******************************<BR>&#039; code<BR>****************************************** **********************<BR>Public Function GetEmployeeInfo(ByVal strUsername As String) As Boolean<BR><BR> objEntry = New DirectoryEntry("LDAP://,o=company")<BR><BR> &#039; Set up to search for UserMan on the Users node<BR> objSearcher = New DirectorySearcher(objEntry)<BR> objSearcher.Filter = "(&(uid=" & strUsername & "))"<BR><BR> &#039; Find the user<BR> objSearchResult = objSearcher.FindOne()<BR><BR> &#039; Check if the user was found<BR> If Not objSearchResult Is Nothing Then<BR> &#039; Display path for user<BR><BR> Dim myResultPropColl As ResultPropertyCollection<BR> myResultPropColl = objSearchResult.Properties<BR><BR> mstrRDN = myResultPropColl("rdn")(0).ToString<BR> mstrPostalCode = myResultPropColl("postalcode")(0).ToString<BR> &#039; etc, etc...<BR><BR> Return True<BR> Else<BR> Return False<BR> End If<BR><BR>End Function

  2. #2
    Join Date
    Dec 1969

    Default RE: Component Almost Working

    This is just a shot in the dark.. but the user for is the ASPNET user or IUSR_MACHINE name where-as if you ran it from a form it would be the current user you logged in as.. And if your on a domain.. your credentials may be high enough to do whatever you want on exchange... but.. I dont really know anything about exchange server. This is a guess. If this is the case.. You would have to specify some kind of credentials through Through impresonation or as you have just done.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts