I had the same issue in a Windows Service. All keys where in the right place in the registry. The build of the service was done for x86 and I still got the exception. I found out about CorFlags.exe
Run this on your service.exe
without flags to verify if you run under 32 bit. If not run it with the flag /32BIT+ /Force
(Force only for signed assemblies)
If you have UAC turned you can get the following error: corflags : error CF001 : Could not open file for writing
Give the user full control on the assemblies.