OT: Help with Security Policy (VSTO)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I know this is not a C# issue, but I've always found this group to be a
great help. I've also posted to the Framework group and the VSTools.Office
group.

I was working on a Visual Studio Tools for Office (VSTO) 2003 Excel project,
and everything was going fine. Had to reinstall Windows on Monday, thus
wiping out the Security Policy that I had set up. I tried recreating the
Security Policy manually (using the .NET Configuration tool), but now my
project won't run, giving the error:

"The assembly MyProject could not by found at .\MyProject_bin\ or could not
be loaded. You can still edit and save the document..."

I've changed nothing in my project (I just opened it in VS.NET and clicked
Run). I'm pretty sure that the problem doesn't lie with the MyProject
assembly (or the Excel file), rather with one of the referenced assemblies,
of which there are several.

I've tried giving Execution privilage to the \MyProject_bin\* folder, and
Full Trust to each assembly within it. I've also tried giving Full Trust to
the \MyProject_bin\* folder - hoping that everything within it will
"inherit" the Full Trust privilage (probably not a good idea, but I don't
care right now!). Both yeild the same result.

The only time I can get something other that this error is when the
\MyProject_bin\* has Execution, and the MyProject.dll within that folder has
Full Trust. Then, in one of the referenced assemblies (to which no security
policy is assigned), I get a SecurityException - which makes sense. As soon
as I add Full Trust to that assembly, I'm back to the original error above.

Any ideas??

Thanks,

Derrick


.



Relevant Pages

  • Re: Question about strong-name dlls
    ... Well, Diego, in case you're still there, I have one observation: ... "project folder" the folder the app is trying to write a file to? ... > full trust to all code, so I don't know what else to do. ... >>> by the security policy. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Help with security policy
    ... I was working on a VSTO 2003 Excel project, ... I tried recreating the Security Policy manually (using the ... Full Trust to each assembly within it. ... in one of the referenced assemblies (to which no security ...
    (microsoft.public.vsnet.vstools.office)
  • Help with Security Policy
    ... I was working on a Visual Studio Tools for Office 2003 Excel project, ... Security Policy manually, ... Full Trust to each assembly within it. ... in one of the referenced assemblies (to which no security ...
    (microsoft.public.dotnet.framework)
  • Re: Strong Name Assembly
    ... just strongnaming your assemblies won't solve your problem. ... You will have to modify the security policy as well. ... To modify the polcy to trust a specific strong name by using the Microsoft ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Newbie Question: Trust an Assembly Wizard
    ... > use wildcards or something to trust all assemblies in a particular ... Code Group that points to the folder in question (application ...
    (microsoft.public.dotnet.security)