IIS 7 構成エディターを使用して、アプリケーション固有の設定を編集したいと考えています。applicationSettings
設定は、Visual Studio を使用してプロジェクトに設定を追加するときに自動的に追加される種類のセクションに保存されます。私のセクションは次のようになります。
<applicationSettings>
<My.Custom.Properties.Settings>
<setting name="SomePath" serializeAs="String">
<value>D:\Folder\SubFolder</value>
</setting>
</My.Custom.Properties.Settings>
</applicationSettings>
したがって、ここからの指示に従い、多くの試行錯誤の後、IIS エディターにセクションを読み込むことができます。要素の属性を表示 (および編集) できます。setting
要素も表示value
されますが、その中のフォルダー パスが読み込まれておらず、編集できません。これが必要です。IIS に追加したスキーマは次のようになります。
<configSchema>
<sectionSchema name="applicationSettings/My.Custom.Properties.Settings">
<collection addElement="setting">
<attribute name="name" type="string"></attribute>
<attribute name="serializeAs" type="string"></attribute>
<element name="value"></element>
</collection>
</sectionSchema>
</configSchema>
私がやろうとしていることに成功した人はいますか、それとも、古いappSettings
セクションに戻らないでこれを回避する方法はありますか?