CLR - Access Denied Error

  • Hi Friends,

    We do use CLR functions for encrypting and decrypting sensitive information. The CLR works fine on the Dev and Test environments. When the assemblies along with the CLR functions got moved to the UAT environment, I am getting this error

    Msg 6522, Level 16, State 2, Line 1

    A .NET Framework error occurred during execution of user-defined routine or aggregate "fn_COM_DecryptInfo":

    System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    System.UnauthorizedAccessException:

    at System.ConfigServer.RunParser(IConfigHandler factory, String fileName)

    at System.ConfigTreeParser.Parse(String fileName, String configPath, Boolean skipSecurityStuff)

    at System.Security.Cryptography.CryptoConfig.InitializeConfigInfo()

    Any idea what could be the possible reason.

    Thanks

    Vinoj

  • What permission set are you loading the assembly with in production?

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • My first thought was CAS, Code Access Security, has access to that been restricted..

    CEWII

  • One of the assembly was created with Permission_Set = Safe and the other one with Permission_set = UNSAFE. I did try changing both to Remote_Access but it didnt help

  • RBarryYoung (8/13/2009)


    What permission set are you loading the assembly with in production?

    I thought that too, but I've always seen CAS exceptions indicated somewhere in the error messages.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply