I have the following in my web.config file - a snippet of it is shown below - I want to encrypt just the ADConnection section - and note UserID and Password are just for testing to try and get this working:
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<ADConnection
UserID="Test"
Password="Test1234"
/>
<connectionStrings>
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<pages>
The machine I'm running the command below on is 64 Bit Windows Server 2008 R2.
I have tried the following - right clicked and run CMD as Admin.
cd to: C:\Windows\Microsoft.NET\Framework\v4.0.30319
Then I tried the following command:
aspnet_regiis.exe -pef "ADConnection" C:\Users\Test\Documents\Visual Studio 2012\Projects\WebApplication
1\WebApplication1\Web.config
However when I hit enter it just list me all the options of what aspnet_regiis can do and a brief description that aspnet_regiis is an administration too used to install and unistall ASP.NET on the local machine.
Is there something I have missed?