Troubleshoot WebResource.axd

I find that for one particular web application, requests for WebResource.axd return a completely blank page. (Copying and pasting the link into a new browser window results in an empty response document)

IIS logs showing that requests to WebResource.axd are successful (HTTP status code 200)

The application itself is complex, and therefore it seems likely that this is what the application does that calls it, however I do not know what.

What additional debugging steps can be taken to understand why these requests fail, and where should I look for places where the behavior of the application can affect WebResource.axd in this way?

Things I've tried so far:

  • Creating a new virtual directory in IIS pointing to the same directory gives the same results (empty WebResource.axd document)
  • Creating a completely new blank blank page and placing it in this directory gives the same results.
  • If I create a new virtual directory in IIS pointing to a different folder, then the blank page works as expected.
  • Sharing web.config files between working / broken directories has no effect.

This is on a computer running Windows XP with IIS 5.1

+6
source share
3 answers

Turns out the problem was the HttpResponse filter that I used in the Application_PreRequestHandlerExecute method in Global.asax. I generally applied the filter to all requests - although the filter left the contents unchanged for WebResouce.axd, this still caused problems.

The following links helped me understand and describe this in more detail:

The solution was to skip the filter application for WebResouce.axd.

+4
source share

If you are using Visual Studio 2013 Preview, this is a known issue: https://connect.microsoft.com/VisualStudio/feedback/details/792689/webresource-axd-returns-a-200-ok-empty-response

(obviously this does not apply to OP, but to anyone who comes from google)

+2
source share

I did not use Application_PreRequestHandlerExecute, but added OutputFilterStream to Application_BeginRequest. This caused the same problem as the WebResource.axd response, returning with a status code of 200, but an empty response.

0
source share

All Articles