<?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>Codebeater - Programming .NET</title>
	<atom:link href="http://codebeater.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codebeater.com</link>
	<description>Navigating Visual Studio and the .NET Framework</description>
	<lastBuildDate>Tue, 08 Jun 2010 03:03:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Solution for ASP.NET MVC Routing issue on Godaddy shared hosting</title>
		<link>http://codebeater.com/2010/05/solution-for-asp-net-mvc-routing-issue-on-godaddy-shared-hosting/</link>
		<comments>http://codebeater.com/2010/05/solution-for-asp-net-mvc-routing-issue-on-godaddy-shared-hosting/#comments</comments>
		<pubDate>Fri, 14 May 2010 05:07:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codebeater.com/?p=21</guid>
		<description><![CDATA[This is actually not an issue related to Godaddy shared hosting at all but an issue with hosting an ASP.NET MVC site in a virtual directory.  When you use the shared hosting provided by Godaddy you get a root folder and limitless subfolders, each of which can be its own domain, by way of virtual directory.  Unfortunately, MVC's routing engine produces URLs that will include the virtual directory name appended to the domain name.  ]]></description>
			<content:encoded><![CDATA[<p>This is actually not an issue related to Godaddy shared hosting at all but an issue with hosting an ASP.NET MVC site in a virtual directory.  When you use the shared hosting provided by Godaddy you get a root folder and limitless subfolders, each of which can be its own domain, by way of virtual directory.  Unfortunately, MVC&#8217;s routing engine produces URLs that will include the virtual directory name appended to the domain name.</p>
<p>For example, let&#8217;s say you have a domain named <em>http://www.example.co</em>m and your folder/virtual directory name is <em>/File</em>.  If you take the MVC template project without making any modifications and upload it to your folder and then go to your url everything will look fine.  You will notice the &#8216;Home&#8217; and &#8216;About&#8217; tabs at the top right of the page.  When you click on the &#8216;About&#8217; tab, since it is routed to the Home controller&#8217;s About action, you would rightly expect the URL to be <em>www.example.com/Home/About</em>.  What you will see, though, is that the URL generated by the ActionLink method includes the name of the virtual directory.  Therefore, the URL will be <em>www.example.com/File/Home/About</em>.</p>
<p>If this problem doesn&#8217;t bother you then kudos to you.  It bothers me and I was really hoping to find a resolution that involved configuration, rather than writing a bunch of custom code for something I felt should work &#8216;out of the box&#8217;.  After posting the question <a href="http://codebeater.com/2010/05/asp-net-mvc-routing-on-godaddy-shared-hosting/">here</a> and scouring various forums I found many others having the same problem but not one solution.</p>
<p>Luckily for me, I have a couple of friends and former coworkers that now work at Godaddy who jumped on this issue when I posted it to their forums.  I want to first say thanks to both of them for taking the time to dive into this and finding a configuration-based solution that works perfectly.  You know who you are!</p>
<p>So now for the solution, and I probably should have mentioned this at the beginning but hopefully you&#8217;re using IIS7 with the URL rewriting module installed (it is installed by default when you use IIS7 on Godaddy).</p>
<p>Simply add the following into your web.config&#8217;s system.webServer element:</p>
<p>&lt;rewrite&gt;</p>
<p>&lt;rules&gt;</p>
<p>&lt;rule name=&#8221;Remove Virtual Directory&#8221;&gt;</p>
<p>&lt;match url=&#8221;.*&#8221; /&gt;</p>
<p>&lt;action type=&#8221;Rewrite&#8221; url=&#8221;{R:0}&#8221; /&gt;</p>
<p>&lt;/rule&gt;</p>
<p>&lt;/rules&gt;</p>
<p>&lt;/rewrite&gt;</p>
<p>All this does is &#8220;rewrite&#8221; the URL with itself. This causes URL Rewrite to add the original URL (the one with no folder name) to a ServerVariable which is used by ASP.NET MVC to generate other URLs.</p>
<p>Again, this only works when you&#8217;re using IIS7 with the url rewriting module installed.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://codebeater.com/2010/05/solution-for-asp-net-mvc-routing-issue-on-godaddy-shared-hosting/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC Routing on Godaddy shared hosting</title>
		<link>http://codebeater.com/2010/05/asp-net-mvc-routing-on-godaddy-shared-hosting/</link>
		<comments>http://codebeater.com/2010/05/asp-net-mvc-routing-on-godaddy-shared-hosting/#comments</comments>
		<pubDate>Sun, 02 May 2010 06:32:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Godaddy]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Routing]]></category>

		<guid isPermaLink="false">http://codebeater.com/?p=19</guid>
		<description><![CDATA[For some time now I&#8217;ve been working on an ASP.NET MVC site that I had intended on hosting using my Godaddy account.  Well tonight I decided to test it and discovered that routing doesn&#8217;t work as one would expect.  I simply uploaded the MVC template that you get when you create a new MVC project. [...]]]></description>
			<content:encoded><![CDATA[<p>For some time now I&#8217;ve been working on an ASP.NET MVC site that I had intended on hosting using my Godaddy account.  Well tonight I decided to test it and discovered that routing doesn&#8217;t work as one would expect.  I simply uploaded the MVC template that you get when you create a new MVC project.  On Godaddy you install your sites into virtual directories.  The problem is that the url routing is including the virtual directory in the urls.</p>
<p>Let&#8217;s say you have a site named www.awesomesite.com and you&#8217;re going to put it into a folder (virtual directory) named /awesomesite/.  The routed urls will look like www.awesomesite.com/awesomesite/About</p>
<p>If I have to I will go to a different provider but I&#8217;m hoping I can find an easy solution.  If you know how to solve this please post a response.</p>
<p>Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://codebeater.com/2010/05/asp-net-mvc-routing-on-godaddy-shared-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visual Studio Tip #1 &#8211; Find and Replace Dialog Docking</title>
		<link>http://codebeater.com/2009/11/visual-studio-tip-1-find-and-replace-dialog-docking/</link>
		<comments>http://codebeater.com/2009/11/visual-studio-tip-1-find-and-replace-dialog-docking/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 18:07:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codebeater.com/?p=14</guid>
		<description><![CDATA[Have you ever been in the middle of a Find and Replace where you&#8217;re replacing words one by one and then the Find and Replace dialog jumps a bit and you accidentally hit the &#8216;Replace All&#8217; button?  There&#8217;s an easy way to avoid this happening by docking your Find and Replace dialog with your other [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever been in the middle of a Find and Replace where you&#8217;re replacing words one by one and then the Find and Replace dialog jumps a bit and you accidentally hit the &#8216;Replace All&#8217; button?  There&#8217;s an easy way to avoid this happening by docking your Find and Replace dialog with your other dialogs such as the Solution Explorer.</p>
<p>First thing to do is right-click on the title bar of the dialog and change the selection from &#8216;Floating&#8217; to &#8216;Dockable&#8217;.</p>
<p><img class="alignnone size-full wp-image-15" title="Visual Studio Find Dialog" src="http://codebeater.com/wp-content/uploads/2009/11/find.jpg" alt="Visual Studio Find Dialog" width="323" height="382" /></p>
<p>Now just move it to the location where you want it to dock</p>
<div id="attachment_16" class="wp-caption alignnone" style="width: 475px"><img class="size-full wp-image-16" title="find" src="http://codebeater.com/wp-content/uploads/2009/11/find1.jpg" alt="Find and Replace dialog docking" width="465" height="716" /><p class="wp-caption-text">Find and Replace dialog docking</p></div>
<p>And now your Find and Replace dialog will stay out of the way</p>
<div id="attachment_17" class="wp-caption alignnone" style="width: 472px"><img class="size-full wp-image-17" title="find-docked" src="http://codebeater.com/wp-content/uploads/2009/11/find-docked.jpg" alt="Find and Replace dialog docked" width="462" height="507" /><p class="wp-caption-text">Find and Replace dialog docked</p></div>
]]></content:encoded>
			<wfw:commentRss>http://codebeater.com/2009/11/visual-studio-tip-1-find-and-replace-dialog-docking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
