Also make sure that's only one version of the assembly registered on the production server.

eddy.peng

2015-04-14 01:06

Yes, I'm using the same local account to run .exe and to debug.

I also tried to take the image of production machine and restore it into test network, the .exe works fine, when we restored the image back to production network, I got the same error when it tries to create SessionOptions object.

It really puzzles me and it's just not working in production network.

Your help is highly appreciated.

martin

Re: Error 2146233321 Automation error

2015-04-13

eddy.peng wrote:

But it works fine when I run debug in production environment, I only get this error when I run .exe from Production environment.

Are you running the .exe using the same local account?

eddy.peng

Error 2146233321 Automation error

2015-04-13 06:30

I created a VB6 application to transfer files via SFTP.

I downloaded WinSCP.exe, WinSCPnet.dll and use the following to register the dll for COM type library:

In my VB6 application, I add a reference to WinSCPnet.tlb, the VB6 application works fine in test environment(Windows Server 2003), but I got -2146233321 Automation error when I deploy into Production environment(Windows Server 2003), this error occurs when trying to create SessionOptions object as shown below: