I've added a new Settings.settings file to my ASP.NET Webclient project; I am having a problem encrypting the section. In the cmd window positioned to this directory:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>
Here is my syntax:
aspnet_regiis -pe "Webclient.Properties.Settings" -app "/sdkTrimFileServiceASMXclient"
Output:
Encrypting configuration section...
The configuration section 'Webclient.Properties.Settings' was not found.
Failed!
My project is called Webclient; I clicked on the Settings tab and added 2 elements. Visual Studio 2010 added the Settings.settings file and updated my web.config as follows:
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="WebClient.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
<section name="FileServiceProxy.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false"/>
</sectionGroup>
</configSections>
<applicationSettings>
<WebClient.Properties.Settings>
<setting name="GROUPERpassword" serializeAs="String">
<value>12345abcde</value>
</setting>
<setting name="MARLINpassword" serializeAs="String">
<value>abcdef12345</value>
</setting>
</WebClient.Properties.Settings>
<FileServiceProxy.Properties.Settings>
<setting name="FileServiceProxy_ASMXproxy_FileService" serializeAs="String">
<value>http://MDWDATA/sdkTrimFileServiceASMX/FileService.asmx</value>
</setting>
</FileServiceProxy.Properties.Settings>
</applicationSettings>
I have also tried this syntax (i.e. just "Webclient" rather than "Webclient.Properties.Settings") and I get the same failure as above.
aspnet_regiis -pe "Webclient" -app "/sdkTrimFileServiceASMXclient"
In the Default Web Site on my IIS 6.0 Windows 2003 Server machine, I have a virtual directory called: sdkTrimFileServiceASMXclient
The local path to the physical directory: C:\ProjectsVS2010\sdkTrimFileServiceASMX\WebClient
I can't figure out what I'm doing wrong here.
------------------------------ EDIT UPDATE --------------------------- 13 Dec 2011 A suggestion was made to try this syntax (but I got the same error):
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -pe "applicationSettings/Webclient" -app "/sdkTrimFileServiceASMXclient"
Encrypting configuration section...
The configuration section 'applicationSettings/Webclient' was not found.
Failed!
Try "applicationSettings/WebClient"
instead of just "WebClient"
in your script.
This command is case sensitive, as @John Adams said in his comment below.