Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encryption Web.config file

Status
Not open for further replies.

taree

Technical User
May 31, 2008
316
US
I am able to encrypt the web.confg file in the development server without any problem. however, when i move the code to the production server it gives me an error. Do I need to copy any key from the development server over to the production? I am guessing it is not finding the key that used to encrypt the file when it moved to the production server. Please help. thank you
 
thank you Mark. Where do I find the machine key?
 
thank you Mark again. Please bear with me as I am trying to figure this out. should not I need to know the machine key to include that in my web.cfg file. Is so how can I find out the machine key?
 
Ok! I am getting there :)

for example if I include this in config file then It should work without any issue then.
Code:
<configProtectedData>
  <providers>
    <add useMachineProtection="false" keyEntropy="" name="MyUserDataProtectionConfigurationProvider" 
type="System.Configuration.DpapiProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a" />
  </providers>
</configProtectedData>
 
I get this error when I add
Code:
<configProtectedData>  <providers>    <add useMachineProtection="false" keyEntropy="" name="MyUserDataProtectionConfigurationProvider" type="System.Configuration.DpapiProtectedConfigurationProvider, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />  </providers></configProtectedData>


useMachineProtection attribute is not supported and keyEntropy attribute is not supported
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top