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




Reply With Quote