<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deployment to a Hosting Provider: Web.Config File Transformations - 3 of 12</title><link>http://asp.net</link><pubDate>Wed, 16 May 2012 15:11:42 GMT</pubDate><generator>umbraco</generator><description>Comments for Deployment to a Hosting Provider: Web.Config File Transformations - 3 of 12</description><language>en</language><atom:link href="http://asp.net/rss/comments/36418" rel="self" type="application/rss+xml" /><item><title>Comment Posted by nivram509</title><link>http://asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-web-config-file-transformations-3-of-12</link><pubDate>Fri, 24 Feb 2012 15:48:39 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014935</guid><description><![CDATA[ <p>&quot;Open Web.Release.config and add the following code immediately following the appSettings element that you added earlier.&quot;</p><p></p><p>Does that mean after &lt;/appSettings&gt; or after the &lt;add key...&gt;? Either could be considered the appSettings element I added earlier.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/nivram509.jpg?forceidenticon=false&amp;dt=635050768200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by nivram509</title><link>http://asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-web-config-file-transformations-3-of-12</link><pubDate>Fri, 24 Feb 2012 16:32:45 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014936</guid><description><![CDATA[ <p>All of my builds (Dev, Test, &amp; Release) say (Dev) at the top. Does this mean I&#39;ve done something wrong? Do I need to do something to get Web.Test.config and Web.Release.config to work when I change my build settings in the Configurations Manager?</p><p></p><p>Here&#39;s my &lt;appsettings&gt; from my Web.Test.config</p><p></p><p>  &lt;appSettings&gt;</p><p>    &lt;add key=&quot;DatabaseInitializerForType ContosoUniversity.DAL.SchoolContext, ContosoUniversity.DAL&quot;            </p><p>         value=&quot;Disabled&quot; xdt:Transform=&quot;SetAttributes&quot; xdt:Locator=&quot;Match(key)&quot;/&gt;</p><p>    &lt;add key=&quot;Environment&quot; value=&quot;Test&quot; xdt:Transform=&quot;SetAttributes&quot; xdt:Locator=&quot;Match(key)&quot;/&gt;</p><p>  &lt;/appSettings&gt;</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/nivram509.jpg?forceidenticon=false&amp;dt=635050768200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by nivram509</title><link>http://asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-web-config-file-transformations-3-of-12</link><pubDate>Sat, 25 Feb 2012 15:00:34 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014943</guid><description><![CDATA[ <p>To answer my own questions (in case anyone else wonders):</p><p></p><p>1. After &lt;/appSettings&gt;</p><p></p><p>2. The transforms seem to happen on deploy, not build. Keep going with the tutorial, and you&#39;ll see them work.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/nivram509.jpg?forceidenticon=false&amp;dt=635050768200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-web-config-file-transformations-3-of-12</link><pubDate>Fri, 09 Mar 2012 13:46:41 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015074</guid><description><![CDATA[ <p>@nivram509 - Thanks for the comments -- in the next release of the tutorial I&#39;ll change the wording of &quot;immediately following the appSettings element&quot; to &quot;immediately following the &lt;/appSettings&gt; closing tag.&quot;  I&#39;ll also add an explanation about when the transformations are actually applied.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050768200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by kaelum</title><link>http://asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-web-config-file-transformations-3-of-12</link><pubDate>Thu, 26 Apr 2012 15:10:41 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015418</guid><description><![CDATA[ <p>This article is pretty good, but it does introduce a serious security issue that circumvents the entire QA/UAT/Production deployment system.  By allowing an &quot;Environment&quot; setting you are also allowing anyone to write code that will only execute in a specific environment, including maliscious code.</p><p></p><p>Way back in 2002, a Microsoft ASP.NET architect brought up the idea and community immediately pointed out the issue.  This was going to be a new setting in the machine.config, but after a month on negative publicity Microsoft agreed to not release the change.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/kaelum.jpg?forceidenticon=false&amp;dt=635050768200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by tdykstra</title><link>http://asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-web-config-file-transformations-3-of-12</link><pubDate>Wed, 16 May 2012 15:11:42 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015531</guid><description><![CDATA[ <p>@kaelum - Thanks for the comment. The environment setting in this case doesn&#39;t cause code to execute, it&#39;s for display purposes only, and it illustrates how to handle a common scenario, e.g., when you need to update WCF endpoints in different environments.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tdykstra.jpg?forceidenticon=false&amp;dt=635050768200000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>