locked
Error encrypting 'identity' element and not 'appSettings' element in web.config RRS feed

  • Question

  • User-1674945895 posted

     

    All,

    I'm using RSA Protected Configuration provider and the aspnet_regiis.exe tool to encrypt section of my web.config file.
    I can successfully encrypt 'appSettings' using C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -pe "appSettings" -app "/AppName"
    however the similar command when used with 'identity' C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -pe "identity" -app "/AppNAme" gives me the below message ""Encrypting configuration section...
    The configuration section 'identity' was not found.
    Failed!""

    My web.config identity section looks like this...
     <identity impersonate="true" userName="domain\userAccount" password="whatever"/>

    Trying to encrypt 'sessionState' fails also.


    According to MS article 'How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA' http://msdn.microsoft.com/en-us/library/ms998283.aspx, I should be able encrypt <appSettings>, <connectionStrings>, <identity> and <sessionState>. I'd rather encrypt just the sections I need for performance overhead reasons.

    Any ideas folks?

    Wednesday, September 5, 2007 8:47 AM

Answers

  • User-186742165 posted

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -pe "identity" -app "/AppNAme" gives me the below message ""Encrypting configuration section...
    The configuration section 'identity' was not found.
    Failed!""

    Hi

    You can use this command since <identity> section is under <system.web>

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pe "system.web/identity" -app "/AppNAme"

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 7, 2007 4:29 AM

All replies

  • User-186742165 posted

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -pe "identity" -app "/AppNAme" gives me the below message ""Encrypting configuration section...
    The configuration section 'identity' was not found.
    Failed!""

    Hi

    You can use this command since <identity> section is under <system.web>

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pe "system.web/identity" -app "/AppNAme"

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 7, 2007 4:29 AM
  • User-1674945895 posted

    XiaoYong Dai, thank you. This did the trick.

    Thanks,

    Mike

    Friday, September 7, 2007 4:01 PM