Hello, I'm trying to get my form to work with a topaz signature pad. Anyway I'm getting an error when I debug my form when I add this line to my code:
'internal Topaz.SigPlusNET sigPlus = new Topaz.SigPlusNET();'
I'm not sure if anyone will have any experience with this, but I've looked around and seen this error pop up for other issues so I'm hoping someone will have seen this at some point or might have some insight. Anyway the error I get on startup is this:
InfoPath cannot open the selected form because of an error in the form's code.
System.Reflection.TargetInvocationException, mscorlib
System.Reflection.TargetInvocationException: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'SigPlusNET, Version=1.1.3358.14336, Culture=neutral, PublicKeyToken=6aef07010bb0624f' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
File name: 'SigPlusNET, Version=1.1.3358.14336, Culture=neutral, PublicKeyToken=6aef07010bb0624f' ---> System.Security.Policy.PolicyException: Required permissions cannot be acquired.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission)
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission)
at EDCR_After_Customization_.FormCode..ctor(IRemoteArgumentArrayContract initArgs)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at System.AddIn.AddInExecutorInternal.System.AddIn.IAddInExecutorInternal.Execute(String assemblyName, String className, IRemoteArgumentArrayContract initArgs)
at System.AddIn.AddInExecutorInternal.System.AddIn.IAddInExecutorInternal.Execute(String assemblyName, String className, IRemoteArgumentArrayContract initArgs)
at System.AddIn.AddInExecutor`1.Execute(String assemblyName, String className, IRemoteArgumentArrayContract args)
at Microsoft.VisualStudio.Tools.Applications.EntryPointAdapter..ctor(IRemoteArgumentArrayContract initArgs)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at System.AddIn.AddInExecutorInternal.System.AddIn.IAddInExecutorInternal.Execute(String assemblyName, String className, IRemoteArgumentArrayContract initArgs)
at System.AddIn.AddInExecutorInternal.System.AddIn.IAddInExecutorInternal.Execute(String assemblyName, String className, IRemoteArgumentArrayContract initArgs)
at System.AddIn.IAddInExecutorInternal.Execute(String assemblyString, String className, IRemoteArgumentArrayContract args)
at System.AddIn.AddInExecutor`1.Execute(String assemblyName, String className, IRemoteArgumentArrayContract args)
at Microsoft.VisualStudio.Tools.Applications.Internal.ExceptionFilter.ExceptionFilterHelper.ExecuteCustomization(AddInExecutor`1 executor, String assemblyName, String className, IRemoteArgumentArrayListContract args, IExceptionFilterCallback callback)
at Microsoft.VisualStudio.Tools.Applications.AddInImpl.AttemptInternalLoad(IAppDomainBindingContract appDomainBinding, String appBase, String configFile, PermissionSet topOfStackPermission, StrongName[] strongNameAssemblies)
I notice it mentions something about permissions in there, but I really don't know what to make of this. The reference is signed according to the properties...
Thanks in advance for your help!
Seb