Results 1 to 8 of 8

Thread: Active Directory Error: Cannot create ActiveX component

  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.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Active Directory Error: Cannot create ActiveX component

    Does your 2000 server have AD installed and running on it?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    46

    Re: Active Directory Error: Cannot create ActiveX component

    Hello Rob.
    Thanks for your reply. I talked to our admin and they said that AD is not installed on the windows 2000 server.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Active Directory Error: Cannot create ActiveX component

    Then you can not program against it for your server unless they install it. I am not 100% sure but I believe its a optional feature on 2000 while in 2003 and 2007 its required.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    46

    Re: Active Directory Error: Cannot create ActiveX component

    Hello Rob
    Thanks for the reply. This doesn't make sense to me or my network admin. Since the code does run on my development machine, that would imply that I have Active Directory installed on my development machine and my admin says that I don't have it installed on that dev machine. I'm trying to connect to the AD "database" not the AD that is installed on that one specific server. He said we have AD installed on 4 of our servers, but certainly not all of them.

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Active Directory Error: Cannot create ActiveX component

    Well somehow you got the type library installed on your system (activeds.dll). Does the app run on the other server(s) that have AD installed?
    Could it be a permissions issue on the server?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    46

    Re: Active Directory Error: Cannot create ActiveX component

    We are testing other servers now. The only problem is that the other servers may not have the .NET platform on them. The permissions issue might be a very possible problem.

  8. #8

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    46

    Re: Active Directory Error: Cannot create ActiveX component

    You may have shown us the door to our problem. The code I'm using is not using a specific login account to access AD. How can I read these userFlags but not use the GetObject() method? I guess what i would like to do is make this same call, but use an ActiveDirectory method instead of the GetObject().

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