DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005

    Security problem with Word 2007 Add-in

    In the add-in itself I use reflection.
    An other programmer can give me a DLL file with actions (functions) and with the class, namespace and the path of the DLL
    I can use these functions in my add-in.

    I tested everything in a windows application and it worked perfect.
    After that I tried to use the same code in my Word add-in but I got a Security error.
    Here is the code where I had the problem:

    Assembly *** = Assembly.LoadFile(this.FilePath);
    if (*** == null) return;	//compilatie liep wellicht verkeerd
    System.Type T = ***.GetType(this.Namespace + "." + this.Class);
    object o = System.Activator.CreateInstance(T);
    T.InvokeMember(this.Method, System.Reflection.BindingFlags.InvokeMethod, null, o, new object[] { (object)dicArgs, (object)sConfig });
    The program gave a securityerror on the InvokeMember method.
    Probably I have to register the used dll somewhere in the .NET Framework 2.0.

    Can anybody help me fix this?
    Programming code is like magic, just use the right code (magic words) to make happen what you want...

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    I Googled for "vsto reflection securityexception" and found this: http://forums.microsoft.com/MSDN/Sho...px?PostID=1422 . Does it help?
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Nov 2005
    Ya I also got a similair feedback on my post on the msdn forum
    The problem seems to be fixed now
    Programming code is like magic, just use the right code (magic words) to make happen what you want...

Similar Threads

  1. Replies: 2
    Last Post: 10-09-2006, 05:34 PM
  2. Big security problem
    By Matt in forum ASP.NET
    Replies: 13
    Last Post: 06-18-2003, 07:24 AM
  3. Windows service installation security problem
    By Kenn Leland in forum .NET
    Replies: 0
    Last Post: 10-17-2002, 09:20 PM
  4. security Problem
    By razor in forum Architecture and Design
    Replies: 4
    Last Post: 02-12-2001, 04:53 PM
  5. Replies: 1
    Last Post: 12-21-2000, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.