1

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?

Markus
  • 3,547
  • 10
  • 39
  • 55
  • What type of configuration data is it? Does it have to be stored in web.config? – CodeThug Aug 12 '10 at 19:27
  • I want to place there for instance log4net configuration data (I know that I can place it in a separate file). Another type of configuration are custom sections developed for different components. – Markus Aug 12 '10 at 19:34

1 Answers1

0

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?

Community
  • 1
  • 1
Ryan
  • 23,871
  • 24
  • 86
  • 132