Avatar of nightshadz
nightshadz
Flag for United States of America asked on

Encrypting web.config - <EncryptedData> Invalid Child Element

I followed Microsoft's "How To" to encrypt the connection strings section of my application (http://msdn.microsoft.com/en-us/library/ms998280.aspx)

Everything works fine and the section was encrypted.  I can run the application and it decrypts my connection string correctly.

When I look at my web.config the "configProtectionProvider" attribute is underlined in blue with a tooltip message of "configProtectionProvider is not declared".  Also, <EncryptedData> is underlined in blue with the tooltip message of "the element <connectionStrings> has an invalid child element 'EncryptedData'".  The encrypted section in my web.config looks like this:

  <connectionStrings configProtectionProvider="DataProtectionConfigurationProvider">
    <EncryptedData>
      <CipherData>
        <CipherValue>...</CipherValue>
      </CipherData>
    </EncryptedData>
  </connectionStrings>

How come these two items are underlined yet still work?
.NET Programming

Avatar of undefined
Last Comment
nightshadz

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
aibusinesssolutions

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
nightshadz

ASKER
I found a suggestion to add <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> and it seems to remove the blue underlines but disables intellisense unfortunately.  What's the difference between adding this namespace and not even using an xmlns?
aibusinesssolutions

No difference, it just affects intellisense.
nightshadz

ASKER
Thanks for the info!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck