locked
Key not valid for use in specified state with an exception RRS feed

  • Question

  • I am having problem with ssrs 2005, encryption  & initialization both red in config manager screen.
    Found two backup keys .snk files, both tried to restore the keys but it didn't work at all.
    I kept on getting error messages sayign unable to connect to database.
    also under database link in config manager also received an message with exclamation:
    ***************************************************************************************
    Setting Connection info for reporting server:
    Although saving the database connection succeeded, the report server cannot access internal information about this deployment to determin whether the current configuration is valid for this edition. If you are configuring a scale out deployment, be sure that you initialize any new report servers from one that is already part of the deployment..

    ***************************************************************************************

    Now when tried to create encryption keys it completely failed to recreate encryption keys and also initialize has nothing in it:
    this is found in log file:
    ***************************************************************************************
    ERROR: Exception caught while starting service. Error: System.Runtime.InteropServices.COMException (0x8009000B): Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B)
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at RSManagedCrypto.RSCrypto.ExportPublicKey()
       at Microsoft.ReportingServices.Library.ConnectionManager.GetEncryptionKey()
       at Microsoft.ReportingServices.Library.ConnectionManager.ConnectStorage()
       at Microsoft.ReportingServices.Library.ServiceController.ServiceStartThread()
    ReportingServicesService!library!c!1/19/2010-14:33:49:: e ERROR: Attempting to start service again..

    ***************************************************************************************

    Also used rskeymgmt to recreate the keys. but completely failed to do.


    I am able to run the reports in thedevelopment project mode, but unable to deploy due to the above reasons.

    Thank you veruy much for the helpful information.
    Tuesday, January 19, 2010 8:19 PM

Answers

  • Hi cplusplus,

     

    This problem occurs because the ASPNET account password is reset when you install the .NET Framework 2.0 together with Visual Studio 2005.

     

    To work around this problem, follow these steps after you install SQL Server 2005 Reporting Services:

    1.       Locate and then delete the 1aedd7b5699f3d6a88e354100b596aae* file. This file is located in a subfolder of the following folder:

    %APPDATA%\Microsoft\Crypto\RSA\

     The 1aedd7b5699f3d6a88e354100b596aae* file may be located in an SID folder.

    2.       Then deleted the keys after which report server will be initialized.

     

    If you have any more questions, please feel free to ask.

     

    Thanks,

    Jin Chen


    Jin Chen - MSFT
    Thursday, January 21, 2010 6:48 AM

All replies

  • so you're trying to deploy to new server? is it a one server or two server web farm?

    if you delete our keys and recreate them, that hsould work except that you might need to enter your database connection info.
    Tuesday, January 19, 2010 8:58 PM
  • 0x8009000B is NTE_BAD_KEY_STATE. I think for some reason your key or key container is messed up. Try deleting the key from rs config tool. It should recreate the key container.
    Tuesday, January 19, 2010 11:36 PM
  • i tried encryption keys under config screen.

    There is only see restore / backup / change / delete.

    restore and delete are enabled rest of the buttons are disabled.

    How to enable Change button to recreate the keys?

    Also when i try to connect to DB everything goes fine except this message at the bottom:
    Setting Connection info for reporting server:
    Although saving the database connection succeeded, the report server cannot access internal information about this deployment to determin whether the current configuration is valid for this edition. If you are configuring a scale out deployment, be sure that you initialize any new report servers from one that is already part of the deployment..

    Thank you very much for the helpful information.

    Wednesday, January 20, 2010 11:00 AM
  • Hi cplusplus,

     

    This problem occurs because the ASPNET account password is reset when you install the .NET Framework 2.0 together with Visual Studio 2005.

     

    To work around this problem, follow these steps after you install SQL Server 2005 Reporting Services:

    1.       Locate and then delete the 1aedd7b5699f3d6a88e354100b596aae* file. This file is located in a subfolder of the following folder:

    %APPDATA%\Microsoft\Crypto\RSA\

     The 1aedd7b5699f3d6a88e354100b596aae* file may be located in an SID folder.

    2.       Then deleted the keys after which report server will be initialized.

     

    If you have any more questions, please feel free to ask.

     

    Thanks,

    Jin Chen


    Jin Chen - MSFT
    Thursday, January 21, 2010 6:48 AM