This project is read-only.
1

Resolved

Invalid URL HTTP Exceptions

description

When an invalid URL is requested by a client or a bot (search engines) an exception is thrown. These need to be captured and handled instead of logging the exception. Send proper HTTP error code to client. Example error:
date -- 2014-05-03 21:33:12.6077
level -- Error
logger -- ASP.global_asax
message -- Global Error in Application_Error

exception type -- System.Web.HttpException

exception method -- Void HandleUnknownAction(System.String)

exception message -- A public action method 'undefined' was not found on controller 'HuskyRescue.Web.Controllers.AdoptionController'.

stacktrace --    at System.Web.Mvc.Controller.HandleUnknownAction(String actionName)
   at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

comments

jamesbolton wrote May 4, 2014 at 4:58 AM

Information on handling these errors here