Results 1 to 8 of 8

Thread: Active Directory Error: Cannot create ActiveX component

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    46

    Active Directory Error: Cannot create ActiveX component

    Hello
    I have an ASP.NET (2005) web application running on XP. I've add a reference to Active DS Type Library (activeds.dll) to my project. The code below works fine on my development machine but gives the error Cannot create ActiveX component error when I run it on a Windows 2000 server with service pack 4. I noticed that activeds.dll on my development machine is version 5.1.2600.2180 and the file activeds.dll on my server is 5.0.2195.6601.

    I suppose I have 2 questions: 1) Does anyone know if this version difference is my problem? 2) If it is my problem, am I safe to copy the newer version from my development server to my production server?


    Code:
    		Dim IADsUser As ActiveDs.IADs = Nothing
    		Dim intUserFlags As Integer = -1
    		dim PasswordCantChange as Long = 64
    		Try
    			IADsUser = CType(GetObject("WinNT://cincinnatistate/jane.doe,user"), ActiveDs.IADs)
    			intUserFlags = CInt(IADsUser.Get("userFlags"))
    
    			If (intUserFlags And PasswordCantChange) > 0 Then Return True
    
    		Catch ex As Exception
    			log.LogError(Me.ToString(), "GetUserAccountControlValue", ex.Message, ex)
    			Return False
    		Finally
    			IADsUser = Nothing 'Release unmanaged COM object
    		End Try
    Last edited by FrankieBakerJr; May 10th, 2007 at 11:18 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width