2016-09-14 7 views
1

最近、私はそれに依存する他のモジュールの基本的なものをインストールするためのモジュールを作成していました。 すべてのモジュールが動作するようにweb.configの変更を手動で行う必要があり、モジュールのインストールプロセスで自動化する方法があるかどうか疑問に思っていました。モジュールをインストールするときに、DNN web.configに行を追加できますか?

答えて

4

はい。モジュールのDNNマニフェストファイルに、configセクションを追加することができます。

http://www.dnnsoftware.com/wiki/manifest-config-component

例:

<component type="Config"> 
    <config> 
     <configFile>web.config</configFile> 
     <install> 
      <configuration> 
       <nodes> 
        <node path="/configuration/appSettings" action="update" key="key" collision="overwrite"> 
         <add key="myCustomKey" value="123456789" /> 
        </node> 
       </nodes> 
      </configuration> 
     </install> 
     <uninstall> 
      <configuration> 
       <node path="/configuration/appSettings/add[@key='myCustomKey']" action="remove" /> 
      </configuration> 
     </uninstall> 
    </config> 
</component> 
関連する問題