Eurl.axd error when redirecting from one asp.net 4 website to another in IIS 6

I recently came across an unusual error when trying to redirect to an asp.net 4 website from another website in IIS6. This came about because a client had 2 domains hosted with us. One domain, lets call it Web1, was setup using asp.net 4 and had a website on it. The other domain, Web2, was just used for emails and contained no website.

The client requested that when users go to the Web2 address they would automatically be brought to the Web1 site. Normally when we do something like this we just setup a redirect rule in II6 on the Web2 domain that redirects to Web1. However, in this instance, once we setup our redirect we were getting an error on the Web1 website saying that it couldn't find a resource: {domain}/eurl.axd/{long number}

After a bit of digging around I came across a good StackOverflow.com query someone had that was similar to my problem. Even though all the answers were not really what I wanted to do I did learn that this was a 'feature' of .net 4, extenionless URLs and IIS6. My solution was to just use a 301 redirect page on the Web2 site and have the user redirected from that page instead of IIS6 itself. This worked like a charm.

So, if you are having this eurl.axd error when redirecting from one website to another and you need to keep extensionless URLs then using a redirect webpage should work for you. Sometimes, the easiest solutions work best!

blog comments powered by Disqus

Get In Touch

Follow me online at TwitterFacebook or Flickr.

Latest Tweets