views:

37

answers:

2

I have a .NET library that I'm trying to use via COM (hMailServer's VBScript scripts). I got it all working on my local, development box (Windows 7 x64). However, after copying the DLL to my server (Windows Server 2008 x64) I keep getting the following error when the VBScript runs:

Error: 800A01AD - Description: ActiveX component can't create object: 'hMailServerPlugins.EventHandlers' - Line: 2 Column: 1 - Code: (null)"

I've given the assembly a strong name. I put the assembly in the same directory as hMailServer and I've registered it using

regasm hMailServerPlugins.dll /codebase /tlb:hMailServer.tlb

the references show up in the assembly too! I've even tried changing the hMailServer service to startup using Administrator user credentials to make sure this isn't a security thing.

Any ideas?

A: 

Not sure if you've fixed the issue as a couple have months have gone by... I have a similar problem. Build for x64 only deselcted the com interop and registerd post build.. more info here..

http://social.msdn.microsoft.com/Forums/en-US/netfx64bit/thread/7f119e17-b75d-4d17-9e2d-ce50390c459a

however despite doing that I still get an error.

Would love to hear how you got on and if you solved issue..

Antoine
just posted answer for you
statichippo
A: 

I'm posting this for Antoine and anyone else who might stumble upon this thread.

It turned out that I had to explicitly call the 64bit regasm to properly register the library. The location on my machine is

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe

Hope that helps

statichippo

related questions