error in COM objects conversion

Topics: Updater Application Block
Apr 6, 2007 at 10:15 AM
I am using AutoUpdate for .NET 1.0 library source code built in my application. The problem is folowing. I have a file Downloaders->BitsDownloader.cs, there is a method in this file: private void SetBackgroundJobCredentials(IBackgroundCopyJob backgroundCopyJob)

the first instruction in this method is: IBackgroundCopyJob2 copyJob = (IBackgroundCopyJob2) backgroundCopyJob;

While debugging I saw that backgroundCopyJob in this method is a COM object. Proceeding instruction mentioned above causes exception "Invalid cast exception". It seems to me that COM object cannot be converted to IBackgroundCopyJob2 interface...

I've tried this code on other computers and always has the same crash result. But this code works on one machine that had MS Interprise Library installed on. I tried to uninstall MS Interprise, but this codes works anyway on this machine, so it seems to mett that I have some specific COM object registered on this machine that is absent on others, where MS Interprise was never installed. But I can't find the source of this COM object and install it on other machines.

What should I do to make this code work on other machines with no MS Interprise lib installed.

Waiting for your help.

Sorry about my bad English.