Re: NUnit and StrongnameIdentityPermission
From: David W. Griffin (Griffin_at_discussions.microsoft.com)
Date: 08/30/04
- Next message: Jason Collum: "Enabling App Domain Policy to run an executable"
- Previous message: Russ: "UNC Path access is denied"
- Next in thread: Nicole Calinoiu: "Re: NUnit and StrongnameIdentityPermission"
- Reply: Nicole Calinoiu: "Re: NUnit and StrongnameIdentityPermission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 30 Aug 2004 10:33:07 -0700
I'm pretty new to .NET and C# but I'm having a problem whose title could have
been identicial to this one. Basically, In .NET I have a NUnit test which
calls a function that loads an XML file. It works fine in .NET. Called from
NUnit on my desktop computer (XP Pro, but a Lockheed version of XP Pro) it
fails with the following error:
CommonTests.FlightDataProcessingTests.TestHistoricalTrendData.TestCreateHistoricalTrendDataItem
: System.Security.SecurityException : Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
Called from two other computers, one running vanilla XP Home and another
running vanilla XP Pro it works fine. Does anyone have any idea of what this
could be a result of? Is there some security measure I need to disable to fix
to get rid of this?
"Nicole Calinoiu" wrote:
> Carel,
>
> If you are using link demands instead of full stack demands, this shouldn't
> be an issue if you sign your test assembly with the same signing key. If
> you're using full demands, either one of the following might be an option:
>
> 1. Re-compile NUnit from its source (available in the NUnit install
> directory) after signing it with your own key.
> 2. Instead of using full demands, test that each caller in the stack is
> signed with any one of multiple acceptable keys from your own code. An
> example of this approach is available at
> http://blogs.msdn.com/Eugene_Bobukh/archive/2004/03/10/87603.aspx.
>
> #1 would probably be a lot less work if you're already well into
> implementing your project.
>
> HTH,
> Nicole
>
>
> "Carel Lotz" <CarelLotz@discussions.microsoft.com> wrote in message
> news:32CEAAE9-8055-4C73-ADD2-1993693009E4@microsoft.com...
> > Hi
> >
> > We have created a framework of components for use only within our company
> > and have therefore added StrongNameIdentityPermission with LinkDemands to
> > our company's key on the public interfaces of some of the assemblies.
> > This all works fine however we have run into a problem when executing the
> > unit tests for the assemblies as a caller within the call chain is now
> > NUnit itself. This brings about the permission error.
> >
> > How do I get our assemblies to automatically trust NUnit as a caller?
> >
> > Thanks
> > --
> > Carel Lotz
> > "I want to code till I die" - Robert C. Martin
>
>
>
- Next message: Jason Collum: "Enabling App Domain Policy to run an executable"
- Previous message: Russ: "UNC Path access is denied"
- Next in thread: Nicole Calinoiu: "Re: NUnit and StrongnameIdentityPermission"
- Reply: Nicole Calinoiu: "Re: NUnit and StrongnameIdentityPermission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|