ChilkatDotNet2.dll on x64 from a Windows Service

Here’s the secret to getting the .NET runtime to load the ChilkatDotNet2.dll from a Windows Service: It must be installed in the GAC, but there’s a separate GAC for 64-bit assemblies:

(with permission from the Chilkat customer)
I was able to find a solution to this. I'm running a 64-bit version of
Vista, and there turns out to be a separate GAC for 64-bit assemblies, and
my application was searching there, and was not able to find the 32-bit
Chilkat assembly. I installed the 64-bit version in addition to the 32-bit
one in the GAC, and then the assembly loaded fine. Why this works when
running as a normal application but not when running as a service I don't
know, but at least it is working now.

Thanks for your excellent support!

This was the original error:

(with permission from the Chilkat customer)
> > Thanks for your immediate response. I tried to install the assembly in the
> > GAC, but it does not seem to help. I am able to load another GAC assembly
> > without problems:
> >
> > Assembly a = Assembly.Load("Microsoft.Practices.EnterpriseLibrary.Logging,
> > Version=2.0.0.0, Culture=neutral, PublicKeyToken=bf81d2044fa6b642");
> > Assembly b = Assembly.Load("ChilkatDotNet2, Version=8.7.0.0,
> > Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd");
> >
> > The first load does not throw an exception, but the second does:
> >
> > System.IO.FileNotFoundException: Could not load file or assembly
> > 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral,
> > PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. The system
> > cannot find the file specified.
> >
> > When turning on logging of the binding, it does not seem like the GAC is
> > searched at all, only the file system (current directory).
> >
> > I'm suspecting that this is a permission problem, but running the service as
> > LocalSystem or LocalService gives the same result.