none
StrongNameIdentityPermissionAttribute not working .net 4.0 RRS feed

  • Question

  • can you please help on the below code

    I am using .net 4.0 (vs2010) and the following attributes is not working

    StrongNameIdentityPermissionAttribute

    My Code

    [StrongNameIdentityPermissionAttribute(SecurityAction.Demand, PublicKey = "0024000004800000940000000602000000240000525341315d6cb....")]

    I have tried assembly,class and method lelvel but no luck

    Advance Thanks

    Arun


    Thursday, December 13, 2012 9:53 PM

Answers

All replies

  • Hi Arun,

    "Starting with the .NET Framework 4, identity permissions are not used.

    In the .NET Framework versions 1.0 and 1.1, demands on the identity permissions are effective, even when the calling assembly is fully trusted. That is, although the calling assembly has full trust, a demand for an identity permission fails if the assembly does not meet the demanded criteria. In the .NET Framework version 2.0 and later, demands for identity permissions are ineffective if the calling assembly has full trust. This assures consistency for all permissions, eliminating the treatment of identity permissions as a special case."

    http://msdn.microsoft.com/en-us/library/system.security.permissions.strongnameidentitypermissionattribute.aspx


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 17, 2012 6:36 AM
    Moderator
  • Hi Arun,

    "Starting with the .NET Framework 4, identity permissions are not used.

    In the .NET Framework versions 1.0 and 1.1, demands on the identity permissions are effective, even when the calling assembly is fully trusted. That is, although the calling assembly has full trust, a demand for an identity permission fails if the assembly does not meet the demanded criteria. In the .NET Framework version 2.0 and later, demands for identity permissions are ineffective if the calling assembly has full trust. This assures consistency for all permissions, eliminating the treatment of identity permissions as a special case."

    http://msdn.microsoft.com/en-us/library/system.security.permissions.strongnameidentitypermissionattribute.aspx


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    But this link https://msdn.microsoft.com/en-us/library/system.security.permissions.strongnameidentitypermissionattribute(v=vs.110).aspx says this works for Framework 4.0 and higher too.?


    Cutamacious

    Friday, July 17, 2015 11:36 AM