OneNote and Security Exceptions

  • Thread starter Michael S. Scherotter
  • Start date
M

Michael S. Scherotter

I am trying to build an application (a C# console test application) that uses
the OneNote 2007 Interop API. It compiles but when the application runs, I
get the following exception. Please tell me how I can modify my code so that
it will run.
Michael


System.Security.SecurityException was unhandled
Message="That assembly does not allow partially trusted callers."
Source="TestConsole"
StackTrace:
at
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm,
PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh,
SecurityAction action, Object demand, IPermission permThatFailed)
at TestConsole.Program.Main(String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
 
P

Patrick Schmid

I'd post this question in the OneNote newsgroup. Your chances of getting
a reply on a OneNote COM add-in question in a VBA newsgroup are rather
slim.

Patrick Schmid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top