Static file name is coming in action name in MVC

Jun 6 2012 9:04 AM
Hi Guys,

I am using MVC 2. I found one strange problem during the execution of application.

I have jquery library in my user control. That user control is used on site's master page's header construction.

The application is displaying an error to the user on some point of execution of application.

 System.Web.HttpException (0x80004005): A public action method 'jquery-1.7.1.min.js' was not found on controller 'XXXX.Controllers.HomeController'.     at System.Web.Mvc.Controller.HandleUnknownAction(String actionName)     at System.Web.Mvc.Controller.ExecuteCore()     at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__4()     at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

Somehow the static file name is becoming action name for that controller. 
I want to avoid this kind of thing(error) so it will not prompt error to the user. This file was not included into the IgnoreRoute(). I have added this file into this method and hope that, this error will not occur again.

Please let me know your comments.

Thanks