System.ComponentModel.Win32Exception

Sometimes when I run my application using JNBridgePro, I get a System.ComponentModel.Win32Exception with the additional message “Access is denied.” Why?

jnbshare.dll performs some actions that either require that it be assigned full trust, or else that the user running the application have administrator or power user privileges. If the account running the application is a limited user, and jnbshare.dll has less than full trust, then a Win32Exception will be thrown. To fix this problem by assigning full trust to jnbshare.dll, follow the steps below:

  • Open the Control Panel
  • Double-click on “Administrative Tools”
  • Double-click on “Microsoft .NET Framework 1.1 Wizards”
  • Double-click on “Trust an assembly”
  • Select “Make changes to this computer” and click “Next”
  • Click on “Browse” and navigate to an instance of jnbshare.dll. Click “Next”
  • Click on “This one assembly.rdquo; Click “Next.”
  • Make sure that the slider is positioned at the very top (“Full trust”). Click Next.
  • Review the choices. Click Finish.
  • Close the wizards.