Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.vsnet.vstools.office,microsoft.public.dotnet.security,microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.vsnet.vstools.office,microsoft.public.dotnet.security,microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
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" wrote in message ... 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
Posted to microsoft.public.vsnet.vstools.office,microsoft.public.dotnet.security,microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming,microsoft.public.dotnet.security,microsoft.public.vsnet.vstools.office
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Security for Excel 2007 (group policy) | Setting up and Configuration of Excel | |||
What is the best excel template for insurance policy info? | Excel Discussion (Misc queries) | |||
Excel in VSTO | Excel Programming | |||
Get VSTO code to run on every launch of Excel | Excel Programming | |||
VSTO Excel Addin | Excel Programming |