WEB Deployment Projects RRS feed

  • Question

  • User-889032706 posted

    Hi All,

    I have gone through the article in your blog: http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx as I had a requirement of  for changing the web.config during deployment.

    I tried to work with the Web deployment project as per the article in your blog: http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx

    <?xml:namespace prefix = o /><o:p></o:p><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> I’m unable to undersand few things In the project:<o:p></o:p>1.       In the screen shot No:4 which talks about web deployment, I have observed that the website has 3 web.config files with the following names:-<o:p></o:p>1.productionAppSettings.config<o:p></o:p>2.productionConnectionStrings.config and <o:p></o:p>3.Web.config<o:p></o:p>These are again referd in the screen no:6 in Replace web.config and the productionAppSettings.config and productionConnectionStrings.config are being replaced.<o:p></o:p><o:p> </o:p>My questions are :<o:p></o:p>What is the use of these config files and what data does these files store?<o:p></o:p>How can I achieve the replacement of connection string using only one web.config file in my entire website.<o:p></o:p>What are the disadvantages of using web deployment projects?<o:p></o:p>How can we achieve the same using normal deployment procedure instead of web deployment projects?<o:p></o:p><o:p> </o:p><o:p>Hope if any one can explain me all these... Thanks in Advance</o:p><o:p></o:p> 


    Friday, March 20, 2009 2:52 AM


  • User372121194 posted


    This post seems to be the same discussion on http://forums.asp.net/t/1396512.aspx. We will focus on that post.


    With Web Deployment project, we can use external config file to replace the web.config's element during pre-build. In Scottgu's example, the productionAppSettings.config is for web.config's appSettings element and productionConnectionStrings.config is for web.config's connectionStrings element. The replace is implemented in build time. So ASP.NET will read connection string from web.config file.

    For more information about Web Development project, see http://msdn.microsoft.com/en-us/library/aa479568.aspx

    In your case, you can write the connection string in the web.config file directly and modify it during installation.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 23, 2009 11:32 PM