ADSI and VB 2008 Error "Cannot Create ActiveX Component"
Coming from a Visual Basic 6 background I used to make ADSI requests like this:
Code:
Dim Container As IADsContainer
Container = GetObject("LDAP://ou=Users,dc=RISCPL,dc=local")
Container.Filter = "user"
But in Visual Basic 2008 I get errors:
"A first chance exception of type 'System.Exception' occurred in Microsoft.VisualBasic.dll"
"Cannot create ActiveX component."
Having only just installed and started working with 2008, I am guessing I am missing something obvious to get this to work.
If anyone could help out and tell me where I am going wrong, I would very much appreciate it.
Re: ADSI and VB 2008 Error "Cannot Create ActiveX Component"
90% of the time this error is due to the first issue. If I understand you correctly, it works for a VB executable, but not for an asp.net web page. If so then this is the second issue, one with permissions/
You may need to either change the process identity (using impersonation) for which the ASP.NET worker process interacts with the component, using a (more) privileged Windows account. Fro more help try looking up impersonation in the MS knowledge base (http://support.micorosft.com/support)
If that does not work, then I suggest you contact the component's vendor, Adobe. It could be a license/usage issue. I'm not familiar with the product, so I can't help you there.
Re: ADSI and VB 2008 Error "Cannot Create ActiveX Component"
Quote:
Originally Posted by
Mysteria
"A first chance exception of type 'System.Exception' occurred in Microsoft.VisualBasic.dll"
"Cannot create ActiveX component."
Do you get this error while compiling project in VB, or when you publish it on a server? If while compiling, in which line?
Did you register the DLL that contains this object? It sounds like you're missing some required DLL's.
Re: ADSI and VB 2008 Error "Cannot Create ActiveX Component"
I have gone through some blogs related to your problem and i found in their discussion that the code that produces this error is looking for whether outlook is open, if the outlook is not open then this error generates so you just need to check whether your code requires outlook. And I also wanted to know whether wanted to develop ActiveX component using VB 2008?