tags:

views:

80

answers:

3

Hello stackoverflow world. (This is the first time I actually post a question here. Exciting)

A while ago I inherited a 2 year old MVC website from one of the teams within my corporation. I know most the ins and outs of this solution now but there is something strange cropping up in my error logs which I do not understand.

Every now and then I will get an error messages like this one:

A public action method 'xyz.gif' could not be found on controller MyNamespace.MyController

What I don't understand is WHY is this action (a gif image) being called in the first place?

I've seen 2 different gifs in the error logs pageerror.gif and refresh.gif

As this is an inherited solution I double checked everything and made sure that there are in fact no images like that in the project and no reference anywhere even to those words in the controllers, views, style-sheets or even in the source of pages within the same controller.

I seriously doubt that the users are playing around with the URLs and adding random gif names to them to see what happens.

I'm all out of ideas. Anyone out there who can suggest more places to look for the culprit?

Ta!

+1  A: 

Can you get the error to show up in the logs when you use the site yourself? If so, an add-in such as HttpWatch might help you see those .gif requests. If you can understand more about when they happen you might be able to figure out what's going on.

Richard Ev
I've not been able to reproduce this and i think I'm writing it off (for the time being) as a bad URL being generated in outgoing emails that users can generate using the app (bad HTML in email body linking to that controller's default path).Thanks for mentioning HttpWatch - I've always just used Firebug but looks like HttpWatch is a bit bulkier (at a price though), will definitely give the free version a go though.
solveig
Although Tchami just wrote an intresting comment regarding the IE error pages, might look into that for a bit before writing it off as bad HTML in email bodies.
solveig
A: 

It may be difficult to pinpoint this, but my thought would be: check the javascript. If the image name is being dynamically generated somewhere, and then requested, a simple "find and replace" may miss the reference.

DanP
A: 

As Tchami pointed out in a comment on the original question, this is related to Internet Explorer's default error pages.

As I have set up custom error pages I believe this is either due to an internal server error or possibly somehow an action cancel error from the client side, i.e. client side error. I can't be 100% at this point.

The question is not fully answered but I mostly know what the cause is now.

From my point of view I've identified that I need to improve this ASP.NET MVC application so that

1) it doesn't report/log errors when someone tries to navigate to a non-existing controller action (e.g. these refresh.gif actions or any other)

and 2) handle it better for the client so that they don't end up clicking from one error page (default IE error page) to another (my custom error page when clicking the refresh icon on the IE page)

Another stackoverflow thread on a related topic:

http://stackoverflow.com/questions/1446742/significance-of-pagerror-gif

(i can't post more links as I'm a new user)

CHEERS!

Solveig

solveig