Receiving a strong name error when trying to access a library

P

pottschmidtr

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>
 
J

Joe_Langley

This usually means that the user that is attempting to access this does not
have the correct permissions...assuming this is a webapp (i believe you said
you are using asp.net) the request will have the security context of the
webapp...

I had a similiar problem trying to access Active Directory...the local
ASPNET account does not have enough permissions, so I needed to modify that
in the machine.config file.

Cheers!

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>
 
J

Joe Kaplan \(MVP - ADSI\)

In some cases this might be the issue, but not with a
StrongNameIdentityPermission.

The issue is that the owner of the code has set the member that is being
accessed to only be called by other assemblies that were signed with a
specific strong name key.

The way to get around this is basically with hacking as they designed the
code with the intent that you not do this. You can disable CAS policy on
each machine that needs to run this, reverse engineer the vendors code
(probably illegal) or use one of the other strong name hacking techniques
that have been discussed publicly.

The right thing to do is to not do this though.

Joe K.

Joe_Langley said:
This usually means that the user that is attempting to access this does
not
have the correct permissions...assuming this is a webapp (i believe you
said
you are using asp.net) the request will have the security context of the
webapp...

I had a similiar problem trying to access Active Directory...the local
ASPNET account does not have enough permissions, so I needed to modify
that
in the machine.config file.

Cheers!

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>
 
P

pottschmidtr

Thank you gentelmen and sorry for the slow response.

I figured it was signed but want to make sure I was ass-u-ming anthing.

r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top