简体   繁体   中英

Deploy configuration file to the wss

I need to deploy a custom configuration file to the WSS 3.0. As I have read, there are 2 approaches:

  1. Deploy the configuration file to the 12/CONFIG folder and then use stsadm -o copyappbincontent command. Adv: Suitable for large files. Disadv: All web applications deployed on the server will receive the merged web.config.

  2. Use SPWebConfigModification class and using c# code add the required elements. Adv: We have the control over the web application where we want to deploy the configuration data. Disadv: Cumbersome in case we have large configuration data.

In my case, I have a large block of data that has to be deployed. I want it to be deployed to a certain web application, NOT TO ALL of them. How can I do this using the first approach?

See MSDN - Managing Custom Configuration Options for a SharePoint Application

If your configuration may need to be different at different scope levels (Farm > Web App > Site Collection > Site and event list) then look into the Hierarchical Configuration Manager in the link below.

SO - What is a proper way to store site-level global variables in a SharePoint site?

So you could, for example, setup a configuration for all sites in a particular web app, or all site in a particular collection, or individual sites.

Not sure about your "Large Block of Data" - how large is large? I mean how large can configuration files be in KB?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM