Receiving a strong name error when trying to access a library

pottschmidtr_at_yahoo.com
Date: 06/20/05


Date: 20 Jun 2005 08:13:25 -0700

I receive the following error 'Request for the permission of type
System.Security.Permissions.St­rongNameIdentityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e08­9
failed.' when I try to access a property or method of the library. I
was wondering if the library is secure with a key, so the caller has to

be sign with same key or I'm calling the library incorrectly. Do I need

an assembly tag with in code?

I'm attempting to add functionality to a product by adding inline C#
code to a ASP.Net control. The software does not have a published SDK
but I can determine how to use the libaries from previous versions. Any

help is greatly appreciated and links to documentation or explanation
are great helps for learning.

Many thanks,

Robert Pottschmidt

Below is the code sample:
...
Software.DataLayer.One a;
Software.BusinessLogic.Two b;
a =(Software.Libary.One) Session["XXXXX"];
a = l.Inbox; //The code blows up here with the above error
...

PermView of the classes:

C:\Documents and Settings\rob>permview /decl Software.Libary.dll

Microsoft (R) .NET Framework Permission Request Viewer. Version
1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Class Software.DataLayer.One LinktimeDemand permission set:
<PermissionSet class="System.Security.Permiss­ionSet"
               version="1">
   <IPermission
class="System.Security.Permiss­ions.StrongNameIdentityPermiss­ion,
 mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e08­9"
                version="1"

PublicKeyBlob="002400000480000­094000000060200000024000052534­1310
0040000010001007F850AB9C51768C­40BB2BC90AC0E7A733B0717D1139F2­BDE487A76A8FA93E887D

2CB0B63EF25B401038A7A48CA5DB63­8EFD867515D8219EF8A58F3B1D098C­89C278F6078789564F1F

6F6C088729F4D0D3BEE66E923A49B9­A22E3404837A14E5DDB1AC258BB0C1­22329B06E531E05CF2E7

214936E57EE0F998BC093AD2C351BB­9"/>
</PermissionSet>

Below is the code sample:
...
Software.DataLayer.One a;
Software.BusinessLogic.Two b;
a =(Software.DataLayer.One) Session["XXXXX"];
b = a.Inbox; //The code blows up here with the above error
...

PermView of the classes:

C:\Documents and Settings\rob>permview /decl Software.Libary.dll

Microsoft (R) .NET Framework Permission Request Viewer. Version
1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Class Software.DataLayer.One LinktimeDemand permission set:
<PermissionSet class="System.Security.Permiss­ionSet"
               version="1">
   <IPermission
class="System.Security.Permiss­ions.StrongNameIdentityPermiss­ion,
 mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e08­9"
                version="1"

PublicKeyBlob="002400000480000­094000000060200000024000052534­1310
0040000010001007F850AB9C51768C­40BB2BC90AC0E7A733B0717D1139F2­BDE487A76A8FA93E887D

2CB0B63EF25B401038A7A48CA5DB63­8EFD867515D8219EF8A58F3B1D098C­89C278F6078789564F1F

6F6C088729F4D0D3BEE66E923A49B9­A22E3404837A14E5DDB1AC258BB0C1­22329B06E531E05CF2E7

214936E57EE0F998BC093AD2C351BB­9"/>
</PermissionSet>



Relevant Pages

  • Receiving a strong name error when trying to access a library
    ... System.Security.Permissions.StrongNameIdentityPermission, mscorlib, ... Microsoft.NET Framework Permission Request Viewer. ... Copyright Microsoft Corporation 1998-2002. ...
    (microsoft.public.dotnet.general)
  • Re: Required permissions cannot be acquired?
    ... Microsoft.NET Framework Permission Request Viewer. ... Copyright Microsoft Corporation 1998-2002. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Trying to run in partial trust (getting a PolicyException)
    ... RequestMinimum and the two items below were the only uses in all of my code. ... class="System.Security.Permissions.EnvironmentPermission, mscorlib, ... I think you can check the permission ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • MOSS Search crashing after Infrastructure Update
    ... permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, ... at System.Security.CodeAccessSecurityEngine.Check(Object demand, ... id, String name, String provisioningAssemblyWithoutExtention, String ...
    (microsoft.public.sharepoint.windowsservices)
  • RE: Trying to run in partial trust (getting a PolicyException)
    ... Dominick Baier, DevelopMentor ... class="System.Security.Permissions.EnvironmentPermission, mscorlib, ... I think you can check the permission ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.security)