Recommended Configuration Option? RRS feed

  • Question

  • User-885242585 posted

    I have a web application in asp.net 4.0 (web forms). The over all app is organized into sub apps by a product.




    There could be lots of products but all the code in the site folder is identical in all site folders. The only difference in each folder is the web.config file which contains app settings for that specific product and a DB connection string. Right now i just edit the site code in one place and copy/pasta to all the product folders. 

    Is there a better way? I thought about having just one site folder and having multiple web.configs in the same folder. like web.product1.config and web.product2.config and then pick one dynamically at page_load. not sure if that would work

    Also thought about moving all the settings in a DB table, but seemed overkill to create a db table just to hold 20ish app settings.



    Monday, February 11, 2013 8:39 PM


  • User-821857111 posted

    all the code in the site folder is identical in all site folders.

    That suggests a very brittle design. I would use a database to house any differences, one base application and routing to create the appearance of multiple apps.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 12, 2013 12:34 AM