How are you using the Machine.config, or are you?

前端 未结 4 1546
广开言路
广开言路 2020-12-29 11:10

For ASP.Net application deployment what type of information (if any) are you storing in the machine.config?

If you\'re not using it, how are you managing environmen

4条回答
  •  执念已碎
    2020-12-29 11:30

    We are considering using machine.config to add one key for the environment, and then have one section in the web.config which is excactly the same for all environments. This way we can do a "real" XCopy deployment.

    E.g. in the machine.config for every computer (local dev workstations, stage servers, build servers, production servers), we'll add the following:

    
        
    
    

    Then, any configuration element that is environment-specific gets the environment appended, like so:

    
        
    
    
        
    
    

    One problem that we don't have a solution for is how to enable say tracing in web.config for debugging environment and not for live environment.

    Another problem is that the live connectionstring incl. username and password is now in your Source Control system. This is however not a problem for us.

提交回复
热议问题