<?xml version="1.0" encoding="UTF-8"?>
<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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ten Tonne Baby &#187; .NET</title>
	<atom:link href="http://www.tentonnebaby.com/tag/dotnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tentonnebaby.com</link>
	<description>Discussion on Web Technologies, Design and London</description>
	<lastBuildDate>Thu, 19 Jan 2012 09:33:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configuring a virtual application within an ASP.NET MVC site</title>
		<link>http://www.tentonnebaby.com/2009/06/01/configuring-a-virtual-application-within-an-aspnet-mvc-site/</link>
		<comments>http://www.tentonnebaby.com/2009/06/01/configuring-a-virtual-application-within-an-aspnet-mvc-site/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 16:40:37 +0000</pubDate>
		<dc:creator>Oli</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.embeddedstream.com/2009/06/01/configuring-a-virtual-application-within-an-aspnet-mvc-site/</guid>
		<description><![CDATA[I recently had to look into how to get requests to /TestApp within an ASP.NET MVC site resolving to another application, instead of picking up the default routing rule and trying to find the Index action on a TestApp controller class. A scenario where this may occur would be setting up a wiki application to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to look into how to get requests to /TestApp within an ASP.NET MVC site resolving to another application, instead of picking up the default routing rule and trying to find the Index action on a TestApp controller class. A scenario where this may occur would be setting up a wiki application to run on /wiki off your main domain name.</p>
<p>First off, we need to ensure that the routing module doesn’t kick in and attempt to handle the request. This can be achieved by making the following change in global.asax of the MVC app…</p>
<div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; height: 35px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">routes.IgnoreRoute(<span style="color: #006080">&quot;{*path}&quot;</span>, <span style="color: #0000ff">new</span> { path = <span style="color: #006080">@&quot;TestApp\/(.*)&quot;</span> });</pre>
</div>
<p>You can then create a new virtual directory in IIS under the main site, and convert it into an application to ensure it’s running in a seperate AppPool etc.</p>
<p>The final step is to ensure that web application settings in the parent application don’t cascade and get applied to the child application. This is achieved by wrapping all of the main configuration in a location block, and setting inheritInChildApplications to false like so…</p>
<div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&lt;location path=<span style="color: #006080">&quot;.&quot;</span> inheritInChildApplications=<span style="color: #006080">&quot;false&quot;</span>&gt;
   &lt;system.web&gt;Blah&lt;/system.web&gt;
   &lt;system.webServer&gt;Blah&lt;/system.webServer&gt;
&lt;/location&gt;</pre>
</div>
<p>The most useful reading on this I could find was <a href="http://forums.asp.net/p/1319012/2623590.aspx">this forum post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tentonnebaby.com/2009/06/01/configuring-a-virtual-application-within-an-aspnet-mvc-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

