开发者

Strange asp.net mvc error

Using asp.net Mvc3 RTM, IIS7.

I'm getting flooded with errors like this one:

System.Web.HttpException A public action method 'Application' was not found on controller 'Interreg.Web.Controllers.ApplicationsController'.

System.Web.HttpException (0x80004005): A public action method 'Application' was not found on controller 'Interreg.Web.Controllers.ApplicationsController'.

at System.Web.Mvc.Controller.HandleUnknownAction(String actionName)

at System.Web.Mvc.Controller.ExecuteCore()

at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)

at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execu开发者_Go百科te(RequestContext requestContext)

at System.Web.Mvc.MvcHandler.<>c_DisplayClass6.<>c_DisplayClassb.b_5()

at System.Web.Mvc.Async.AsyncResultWrapper.<>c_DisplayClass1.b_0()

at System.Web.Mvc.Async.AsyncResultWrapper> c_DisplayClass8'1.BeginSynchronous>b__7(IAsyncResult )

at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()

at System.Web.Mvc.MvcHandler.<>c_DisplayClasse.b_d()

at System.Web.Mvc.SecurityUtil.b_0(Action f)

at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)

at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)

at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Controllers and actions changes, they surely do exist and app does not crash - user does not see yellow screen of death.

I suspect it has something to do with static resource loading (images, scripts), probably routing.

Any ideas what's wrong, what can cause this?


It may be what you say. I'd suggest to check IIS log for queries against /Application to see where is that URL and where it's called.

Another option is navigating while in debug mode and in that case exception should pause the execution in Visual Studio.

Good luck!


  1. Verify the type of request.(Either GET or POST)
  2. Add [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)] attributes at above the method
  3. If Application method was returning the Json result add JsonRequestBehavior.AllowGet behavior in return Json. Eg: return Json(zeroResult, JsonRequestBehavior.AllowGet);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜