Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.vsnet.vstools.office,microsoft.public.dotnet.security,microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.vsnet.vstools.office,microsoft.public.dotnet.security,microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.vsnet.vstools.office,microsoft.public.dotnet.security,microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming,microsoft.public.dotnet.security,microsoft.public.vsnet.vstools.office
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Security for Excel 2007 (group policy) justmark Setting up and Configuration of Excel 3 July 29th 07 12:53 PM
What is the best excel template for insurance policy info? totallytori Excel Discussion (Misc queries) 0 April 20th 07 08:14 PM
Excel in VSTO Milo Excel Programming 0 June 17th 05 02:57 AM
Get VSTO code to run on every launch of Excel Dave Excel Programming 1 December 8th 04 08:56 PM
VSTO Excel Addin JK Excel Programming 0 April 14th 04 09:26 PM


All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"