<?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>asp.net mvc &#8211; Nick Swan&#039;s Blog</title>
	<atom:link href="http://nickswan.net/category/asp-net-mvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://nickswan.net</link>
	<description>The harder I work, the luckier I get</description>
	<lastBuildDate>Wed, 21 Aug 2013 01:05:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.2</generator>
	<item>
		<title>runAllManagedModulesForAllRequests=&#8221;true&#8221;</title>
		<link>http://nickswan.net/runallmanagedmodulesforallrequeststrue/</link>
					<comments>http://nickswan.net/runallmanagedmodulesforallrequeststrue/#respond</comments>
		
		<dc:creator><![CDATA[nickswan]]></dc:creator>
		<pubDate>Mon, 12 Aug 2013 19:45:00 +0000</pubDate>
				<category><![CDATA[asp.net mvc]]></category>
		<guid isPermaLink="false">http://nickswan.net/?p=72</guid>

					<description><![CDATA[runAllManagedModulesForAllRequests=&#8221;true&#8221; was something I added to all my web.config files for ASP.NET MVC when I wanted to run the web app in deployment on my Windows Server 2008 box. I wanted to have Glimpse configured for the project though, and as this needed the ability to add (another) module in web.config, I decided to figure &#8230; <a href="http://nickswan.net/runallmanagedmodulesforallrequeststrue/" class="more-link">Continue reading<span class="screen-reader-text"> "runAllManagedModulesForAllRequests=&#8221;true&#8221;"</span></a>]]></description>
										<content:encoded><![CDATA[<p>runAllManagedModulesForAllRequests=&#8221;true&#8221; was something I added to all my web.config files for ASP.NET MVC when I wanted to run the web app in deployment on my Windows Server 2008 box.</p>
<p>I wanted to have <a href="http://getglimpse.com/" target="_blank">Glimpse</a> configured for the project though, and as this needed the ability to add (another) module in web.config, I decided to figure out why runAllManagedModulesForAllRequests was needed in the first place, understand a bit more about it, and then hopefully fix it properly as it always seemed a bit of a hack.</p>
<p>Thankfully there is some good advice here:</p>
<p><a href="http://www.britishdeveloper.co.uk/2010/06/dont-use-modules-runallmanagedmodulesfo.html" target="_blank">Don&#8217;t use runAllManagedModulesForAllRequests=&#8221;true&#8221; when getting your MVC routing to work</a></p>
<p>And a hotfix from Microsoft so you do not need to do any hacking with web.config:</p>
<p><a href="http://support.microsoft.com/kb/980368">http://support.microsoft.com/kb/980368</a></p>
<p><strong>Edit 21/8/2013</strong></p>
<p><strong></strong>Turns out applying the above fix might cause some issues if you then have a . in a url slug, eg /blog/guide-to-hotels-at-hotels.com</p>
<p>The .com part causes an issue.</p>
<p>The below link to a stackoverflow answer shows how to add a httphandler that solves this problem&#8230;</p>
<p><a href="http://stackoverflow.com/a/12151501/5463" target="_blank">http://stackoverflow.com/a/12151501/5463</a></p>
]]></content:encoded>
					
					<wfw:commentRss>http://nickswan.net/runallmanagedmodulesforallrequeststrue/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ASP.NET MVC RenderSection</title>
		<link>http://nickswan.net/asp-net-mvc-rendersection/</link>
					<comments>http://nickswan.net/asp-net-mvc-rendersection/#respond</comments>
		
		<dc:creator><![CDATA[nickswan]]></dc:creator>
		<pubDate>Thu, 21 Mar 2013 09:50:54 +0000</pubDate>
				<category><![CDATA[asp.net mvc]]></category>
		<guid isPermaLink="false">http://nickswan.net/?p=70</guid>

					<description><![CDATA[This post is as much for my own use as others as I&#8217;m always forgetting how to add sections to an asp.net mvc masterpage. In the master page add your subsection using: &#60;footer&#62;@RenderSection(&#8220;Footer&#8221;)&#60;/footer&#62; and in the views implement this section using: @section Footer { &#60;p&#62;This is my footer&#60;/p&#62; } You can make the section optional in &#8230; <a href="http://nickswan.net/asp-net-mvc-rendersection/" class="more-link">Continue reading<span class="screen-reader-text"> "ASP.NET MVC RenderSection"</span></a>]]></description>
										<content:encoded><![CDATA[<p>This post is as much for my own use as others as I&#8217;m always forgetting how to add sections to an asp.net mvc masterpage.</p>
<p>In the master page add your subsection using:</p>
<p>&lt;footer&gt;@RenderSection(&#8220;Footer&#8221;)&lt;/footer&gt;</p>
<p>and in the views implement this section using:</p>
<p>@section Footer {<br />
&lt;p&gt;This is my footer&lt;/p&gt;<br />
}</p>
<p>You can make the section optional in your view:</p>
<p>&lt;footer&gt;@RenderSection(&#8220;Footer&#8221;, required: false)&lt;/footer&gt;</p>
]]></content:encoded>
					
					<wfw:commentRss>http://nickswan.net/asp-net-mvc-rendersection/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using disk: enhanced 

Served from: nickswan.net @ 2021-06-02 04:23:34 by W3 Total Cache
-->