This example depends on a Smartsite.Test.config file in the site root directory (not the web root), containing the following xml:
XML |
Copy Code
|
<?xml version="1.0" encoding="utf-8"?>
<configuration xsi:schemaLocation="http://schemas.microsoft.com/.NetConfiguration/v2.0 System/Schemas/Configuration/smartsite.data.config.xsd"
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<smartsite.test>
<singlenode id="single1" test="a">b</singlenode>
<singlenode id="single2" test="aaa">bbb</singlenode>
<nested id="nestplain">
<singlenode id="single3" test="abcd">abcdef</singlenode>
</nested>
<encrypted>
<singlenode id="encrypted1" test="enc1">asdf</singlenode>
<nested id="nestenc">
<singlenode id="singleenc" test="xyz">12345</singlenode>
</nested>
</encrypted>
</smartsite.test>
</configuration>
|
The "encrypted" node is to be encrypted using the configprotect tool in the site's Bin folder:
|
Copy Code
|
ConfigProtect.exe /encrypt /xpath:"//sc:encrypted" Smartsite.Test.config
|
Note that the GetValue viper doesn't resolve when trying to select an encrypted part of the config file.