Rusty Davis

Engineering Thought

IIS eurl.axd Error File Not found

Finally after weeks trying to resolve my issue with the eurl.axd when I upgraded to the .net 4.0 framework. I was able to get on the phone with Microsoft to resolve the issue.

We spent about 45 minutes on the phone discussing the setup and a little bit of how IIS works under the hood.

When  a request comes into IIS and the requested URL does not have a file extension, IIS in the early stages of the request appends /eurl.axd/guid/ to the URL. Where guid is unique to the life time of the application (and possible the life of the app pool). So what I had done was configure a second website with multiple host headers and “Home Directory” tab specifying a redirect to URL instead of a folder as normally would be done. The request has not yet reached the filter or extension that would handle the request for .axd files, but it read the Metabase configuration to see if it needs to redirect, when it does it fails to remove the eurl.axd from the “appended” original request. In the process it just says ok, new URL specified in the configuration plus the path to the file that was requested, but we didn’t request eurl.axd, and it never removes it from the request.

  1. not sure why it appends the value to the URL without first checking to see if it needs to redirect.
  2. not sure why the redirect works that way when the “description” says this specific URL. It doesn’t say this specific URL and this Folder/File.

So what we did to resolve it was, change the redirect website to the 2.0 framework even though no code is executed on it. Thank goodness that it didn’t affect having to change back to 2.0 framework on the real site, I like having the ability to remove things from the viewstate with such level of control.

About these ads

9 responses to “IIS eurl.axd Error File Not found

  1. Pingback: eurl.axd HttpException « Rusty Davis

  2. Martyn August 17, 2010 at 6:55 pm

    Just to say thanks I had the same problem upgraded IIS 6 Default Web Site to .Net 4.0 and low and behold redirect stopped.
    Thanks for your help

    • shapemetrics October 12, 2010 at 2:09 pm


      I am aware of that resolution. However it is over come if you stop redirecting using IIS to do it. In IIS there is an option to redirect to a specific URL when a page is request is encounted. I had 2 sites setup. One that handled all the www requests and another with requests without www and all other domain names. The issue is the IIS Pipeline is busted…. A request comes in the ISAPI Filter sees that the website is .net 4.0 framework and the directory is the default “/”. What follows that is appends the eurl.axd?guid/filename that is pops out of the filter and hands the request back to IIS… at that point IIS sees that it should redirect and does… with the appended URL not the unedited one.

  3. Dane November 11, 2010 at 11:03 am

    @James Thanks for the link. That worked for me!

    • shapemetrics November 11, 2010 at 11:09 am

      Guys, this is the best explaination that I have seen.

      The issue I was trying to point out is that people should be concerned with is that if you are hosted on a shared enviorment you aren’t going to be able to fix it with a registry hack.

      My issue wasn’t even caused by an external filter that was between 4.0 filter and .net, it was IIS setting for redirecting from another site in the same pool. The issue appeared when I accepted all non-www records on a website and set IIS to redirect to another in the same pool that servered only the www of the domain.

      Moving the site that was redirecting to .net 2.0 resolved my issue.

  4. ynanek November 18, 2010 at 1:48 am

    Thanks for your help.

  5. Perelli December 22, 2010 at 3:26 pm

    I had the exact problem – I found out that if my redirecting site was .NET 4.0 and the site being redirected to was .NET 2.0, problem happened. To fix the problem I change both sites to either 2.0 or 4.0. Problem then solved.

    This was my setup:
    I was using IIS redirection on Windows 2003 Server.

    * 2 sites on IIS – one called non-www and another called www. I wanted all non-www request to be redirected to the www-site, i.e. -> Redirecting non-www to www is for SEO-purposes.

    * My redirection rule in IIS for the non-www was setup the following way:
    On the Home Directory tab, I selected “A redirection to a URL” and entered the following in the “Redirect to”:$S$Q
    For those who do not know the $S$Q, will pass on page and querystring parameters to the target site.
    I then selected the checkboxes “The exact URL entered above” and “A permanent redirection for this resource”.

    It works like a charm and got rid of the eurl.axd error.

  6. Bernhard König May 5, 2011 at 5:56 pm

    Thanks, saved my life … needed to run an ASP.NET 4 “classic” web site together with an ASP.NET MVC 3 website and thought the error was because of some URL rewirter that is used in the classic website … but there wasn’t one. Thanks to your post I know now the redirect website was the problem … at last, an easy fix :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: