1

I am using aspnet_regiis -pef command for encrypting the same but getting error.

Error: The configuration section system.ServiceModel was not found

Do i need to create separate section for service model and then encrypt?

<system.serviceModel>
<extensions>
  <behaviorExtensions>.........
S2K
  • 1,185
  • 3
  • 27
  • 55

1 Answers1

1

you can find the answer here: Encrypting app.config File

In short:

The aspnet_regiis will only encrypt configuration sections - so you need to selectively encrypt those parts you need, like this:

cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
aspnet_regiis.exe -pef "system.serviceModel/bindings" .
aspnet_regiis.exe -pef "system.serviceModel/services" .

etc.

Community
  • 1
  • 1
Yahel
  • 546
  • 5
  • 6