+ Reply to Thread
Results 1 to 4 of 4

Impossible to set security policy for VSTO Excel?

  1. #1
    Michi Henning
    Guest

    Impossible to set security policy for VSTO Excel?

    Hi,

    I just installed Office 2003 and VSTO 2003. I cannot get *any* Excel
    project to run at all. Error is:

    The current .NET security policy does not permit ExcelProject1 to run from the
    folder .\ExcelProject1_bin\. Do not change the security policy in your computer...

    I've read every KB article and blog I could find, and none of the advice resolves
    the problem.

    Here is the sequence of steps I took:

    - Full install of VS 2003
    - Full install of Office 2003
    - Install of VSTO 2003

    - Start new Excel project in Visual Studio, accept all the defaults.
    The project builds fine.

    - When I launch the Excel spreadsheet, I get the above error.

    Checking the security settings, I can see that VS adds the code group
    for the project, and all the path names and permissions look good.

    I've also tried to temporarily add a code group that gives full trust
    to the entire C drive, but that doesn't change anything.

    The exact same thing happens when I create a Word project, so this isn't
    specific to Excel.

    I can't debug the application either. Even when I configure VS to break
    into the debugger for all exceptions, I simply see Excel start up and
    close again.

    Changing the value of the _AssemblyLocation0 property in Excel to use
    a full path name instead of a relative path name makes no difference.

    I'd very much appreciate any hints as to how to debug this. Right now,
    I can't get *any* Excel or Word project to work at all.

    Thanks,

    Michi.

  2. #2
    John R. Durant [MSFT]
    Guest

    Re: Impossible to set security policy for VSTO Excel?

    Michi,
    I'm sorry you are having trouble. Did you nuke any instances of the app that
    running and then restart? Your problem sounds a lot like the issue in this
    kb:

    http://support.microsoft.com/default...;en-us;q824002

    HTH

    --
    John R. Durant [MSFT]
    blog: http://blogs.msdn.com/johnrdurant
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Michi Henning" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi,
    >
    > I just installed Office 2003 and VSTO 2003. I cannot get *any* Excel
    > project to run at all. Error is:
    >
    > The current .NET security policy does not permit ExcelProject1 to run from
    > the
    > folder .\ExcelProject1_bin\. Do not change the security policy in your
    > computer...
    >
    > I've read every KB article and blog I could find, and none of the advice
    > resolves
    > the problem.
    >
    > Here is the sequence of steps I took:
    >
    > - Full install of VS 2003
    > - Full install of Office 2003
    > - Install of VSTO 2003
    >
    > - Start new Excel project in Visual Studio, accept all the defaults.
    > The project builds fine.
    >
    > - When I launch the Excel spreadsheet, I get the above error.
    >
    > Checking the security settings, I can see that VS adds the code group
    > for the project, and all the path names and permissions look good.
    >
    > I've also tried to temporarily add a code group that gives full trust
    > to the entire C drive, but that doesn't change anything.
    >
    > The exact same thing happens when I create a Word project, so this isn't
    > specific to Excel.
    >
    > I can't debug the application either. Even when I configure VS to break
    > into the debugger for all exceptions, I simply see Excel start up and
    > close again.
    >
    > Changing the value of the _AssemblyLocation0 property in Excel to use
    > a full path name instead of a relative path name makes no difference.
    >
    > I'd very much appreciate any hints as to how to debug this. Right now,
    > I can't get *any* Excel or Word project to work at all.
    >
    > Thanks,
    >
    > Michi.




  3. #3
    Michi Henning
    Guest

    Re: Impossible to set security policy for VSTO Excel?

    John R. Durant [MSFT] wrote:
    > Michi,
    > I'm sorry you are having trouble. Did you nuke any instances of the app that
    > running and then restart? Your problem sounds a lot like the issue in this
    > kb:
    >
    > http://support.microsoft.com/default...;en-us;q824002
    >


    No that's not it. I found that article too, but even after a reboot,
    it's still not working.

    It would be *really* nice if there would be a way to find out *why*
    the security check failed, but I don't know of any.

    For what it's worth, I ended up installing Office and VSTO on a
    laptop, just to see what would happen and, lo and behold, it worked
    first time on the laptop.

    The only other difference between the two machines is that I didn't
    apply all the patches for Office on the laptop, whereas I did on
    the other machine.

    So, it looks like there is a problem with the config on the desktop
    machine. But how do I find out what it is?

    Cheers,

    Michi.

  4. #4
    Ariel Raunstien
    Guest

    Re: Impossible to set security policy for VSTO Excel?

    I'm guessing that your excel application is cached your dlls somewhere, and
    tries to run it from there. Try killing all Office apps, and running "gacutil
    /cdl". Then try creating a new VSTO project and run it.

    I know it's a long shot, but WTH.


    Ariel

    "Michi Henning" wrote:

    > John R. Durant [MSFT] wrote:
    > > Michi,
    > > I'm sorry you are having trouble. Did you nuke any instances of the app that
    > > running and then restart? Your problem sounds a lot like the issue in this
    > > kb:
    > >
    > > http://support.microsoft.com/default...;en-us;q824002
    > >

    >
    > No that's not it. I found that article too, but even after a reboot,
    > it's still not working.
    >
    > It would be *really* nice if there would be a way to find out *why*
    > the security check failed, but I don't know of any.
    >
    > For what it's worth, I ended up installing Office and VSTO on a
    > laptop, just to see what would happen and, lo and behold, it worked
    > first time on the laptop.
    >
    > The only other difference between the two machines is that I didn't
    > apply all the patches for Office on the laptop, whereas I did on
    > the other machine.
    >
    > So, it looks like there is a problem with the config on the desktop
    > machine. But how do I find out what it is?
    >
    > Cheers,
    >
    > Michi.
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1