<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Three common ASP.NET MVC URL routing issues</title>
	<atom:link href="http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/feed/" rel="self" type="application/rss+xml" />
	<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/</link>
	<description>The adventures of a young kiwi software developer in London</description>
	<lastBuildDate>Thu, 10 May 2012 16:20:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Richard</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-68067</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 10 May 2012 16:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-68067</guid>
		<description>@Bill: not sure either. Have you tried the &lt;a href=&quot;http://haacked.com/archive/2011/04/12/routedebugger-2.aspx&quot; rel=&quot;nofollow&quot;&gt;ASP.NET MVC Route Debugger&lt;/a&gt;?</description>
		<content:encoded><![CDATA[<p>@Bill: not sure either. Have you tried the <a href="http://haacked.com/archive/2011/04/12/routedebugger-2.aspx" rel="nofollow">ASP.NET MVC Route Debugger</a>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-67933</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Wed, 09 May 2012 21:43:07 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-67933</guid>
		<description>Hi.  I&#039;m absolutely baffled.  As I understand the above, my code should be working.  I have a mixed app.  A calendar is served via MVC, but I have standard pages as well.  If I go to directly to my pages URL (ie.  domain/Default.aspx), the pages load and work correctly.  If not, my MVC calendar is always loaded.  That is, my Default.aspx page no longer loads by default.  If I remove Global.asax and Global.asax.cs from my code, my Default.aspx page loads normally (but, of course, the MVC stops working).

I have the following in my Global.asax.cs page:

        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute(&quot;{resource}.axd/{*pathInfo}&quot;); 
            routes.IgnoreRoute(&quot;{resource}.aspx/{*pathInfo}&quot;);
            routes.IgnoreRoute(&quot;{resource}.aspx&quot;);

            routes.MapPageRoute(&quot;&quot;, &quot;{*anything}&quot;, &quot;/pages/Main.aspx&quot;);

            routes.MapRoute(
                &quot;Calendar&quot;, // Route name
                &quot;Calendar/{controller}/{action}/{id}&quot;, // URL with parameters
                new { controller = &quot;Calendar&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional } // Parameter defaults
            );

        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();            
            RegisterRoutes(RouteTable.Routes);
        }

Any idea why &quot;Default.aspx&quot; won&#039;t load by default when someone goes to my URL?

Thank you.</description>
		<content:encoded><![CDATA[<p>Hi.  I&#8217;m absolutely baffled.  As I understand the above, my code should be working.  I have a mixed app.  A calendar is served via MVC, but I have standard pages as well.  If I go to directly to my pages URL (ie.  domain/Default.aspx), the pages load and work correctly.  If not, my MVC calendar is always loaded.  That is, my Default.aspx page no longer loads by default.  If I remove Global.asax and Global.asax.cs from my code, my Default.aspx page loads normally (but, of course, the MVC stops working).</p>
<p>I have the following in my Global.asax.cs page:</p>
<p>        public static void RegisterRoutes(RouteCollection routes)<br />
        {<br />
            routes.IgnoreRoute(&#8220;{resource}.axd/{*pathInfo}&#8221;);<br />
            routes.IgnoreRoute(&#8220;{resource}.aspx/{*pathInfo}&#8221;);<br />
            routes.IgnoreRoute(&#8220;{resource}.aspx&#8221;);</p>
<p>            routes.MapPageRoute(&#8220;&#8221;, &#8220;{*anything}&#8221;, &#8220;/pages/Main.aspx&#8221;);</p>
<p>            routes.MapRoute(<br />
                &#8220;Calendar&#8221;, // Route name<br />
                &#8220;Calendar/{controller}/{action}/{id}&#8221;, // URL with parameters<br />
                new { controller = &#8220;Calendar&#8221;, action = &#8220;Index&#8221;, id = UrlParameter.Optional } // Parameter defaults<br />
            );</p>
<p>        }</p>
<p>        protected void Application_Start()<br />
        {<br />
            AreaRegistration.RegisterAllAreas();<br />
            RegisterRoutes(RouteTable.Routes);<br />
        }</p>
<p>Any idea why &#8220;Default.aspx&#8221; won&#8217;t load by default when someone goes to my URL?</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-44450</link>
		<dc:creator>Troy</dc:creator>
		<pubDate>Mon, 17 Oct 2011 05:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-44450</guid>
		<description>Great! It was what I was looking  for with &#039;default&#039; actions for a specific URL.</description>
		<content:encoded><![CDATA[<p>Great! It was what I was looking  for with &#8216;default&#8217; actions for a specific URL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How do I redirect a user to a custom 404 page in ASP.NET MVC instead of throwing an exception? &#171; &#171; Programmers Goodies Programmers Goodies</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-34950</link>
		<dc:creator>How do I redirect a user to a custom 404 page in ASP.NET MVC instead of throwing an exception? &#171; &#171; Programmers Goodies Programmers Goodies</dc:creator>
		<pubDate>Sun, 03 Jul 2011 19:42:29 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-34950</guid>
		<description>[...] a look at this page for routing your 404-errors to a specified [...]</description>
		<content:encoded><![CDATA[<p>[...] a look at this page for routing your 404-errors to a specified [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-2386</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Tue, 03 Mar 2009 23:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-2386</guid>
		<description>@Neftali: that&#039;s a good one :) had me banging my head for a few hours as well...</description>
		<content:encoded><![CDATA[<p>@Neftali: that&#8217;s a good one :) had me banging my head for a few hours as well&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neftali</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-2373</link>
		<dc:creator>Neftali</dc:creator>
		<pubDate>Tue, 03 Mar 2009 14:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-2373</guid>
		<description>THANK YOU!!!! I have been searching for the answer to why my URL IDs were not getting passed to the action properly and yours was the first sit to lead me in the right direction... a simple renaming of my parameter to &#039;id&#039; fixed it.</description>
		<content:encoded><![CDATA[<p>THANK YOU!!!! I have been searching for the answer to why my URL IDs were not getting passed to the action properly and yours was the first sit to lead me in the right direction&#8230; a simple renaming of my parameter to &#8216;id&#8217; fixed it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cory</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-514</link>
		<dc:creator>Cory</dc:creator>
		<pubDate>Mon, 25 Aug 2008 15:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-514</guid>
		<description>I installed IIS7 last night and the app ran fine without the Default.aspx file. This post pretty much sums it up I think (http://forums.asp.net/t/1273646.aspx).</description>
		<content:encoded><![CDATA[<p>I installed IIS7 last night and the app ran fine without the Default.aspx file. This post pretty much sums it up I think (<a href="http://forums.asp.net/t/1273646.aspx" rel="nofollow">http://forums.asp.net/t/1273646.aspx</a>).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-508</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Mon, 25 Aug 2008 09:51:30 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-508</guid>
		<description>I&#039;m not sure, Cory - I&#039;ve always left it there. It would be interesting to know what the exact requirements are for IIS6, IIS7 and Cassini, and whether you can safely delete it in some configurations.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure, Cory &#8211; I&#8217;ve always left it there. It would be interesting to know what the exact requirements are for IIS6, IIS7 and Cassini, and whether you can safely delete it in some configurations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cory</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-503</link>
		<dc:creator>Cory</dc:creator>
		<pubDate>Mon, 25 Aug 2008 03:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-503</guid>
		<description>Is it possible to eliminate the need for the Default.aspx page in an MVC application? It seems a little ridiculous that a redirect is necessary before the app is even launched. I thought I read somewhere that IIS7 handles MVC differently than Cassini and that the default page is only necessary for Cassini. Can anyone confirm?</description>
		<content:encoded><![CDATA[<p>Is it possible to eliminate the need for the Default.aspx page in an MVC application? It seems a little ridiculous that a redirect is necessary before the app is even launched. I thought I read somewhere that IIS7 handles MVC differently than Cassini and that the default page is only necessary for Cassini. Can anyone confirm?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Recent Links Tagged With "mvc" - JabberTags</title>
		<link>http://richarddingwall.name/2008/08/09/three-common-aspnet-mvc-url-routing-issues/comment-page-1/#comment-358</link>
		<dc:creator>Recent Links Tagged With "mvc" - JabberTags</dc:creator>
		<pubDate>Thu, 14 Aug 2008 18:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=92#comment-358</guid>
		<description>[...] public links &gt;&gt; mvc   Three common ASP.NET MVC URL routing issues Saved by SpAmStIkA on Thu [...]</description>
		<content:encoded><![CDATA[<p>[...] public links &gt;&gt; mvc   Three common ASP.NET MVC URL routing issues Saved by SpAmStIkA on Thu [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

