Application pool hangs and no back application

Asked

Viewed 1,072 times

3

I have a system in MVC4 on . NET 4.0 that is running on IIS 7.

It generates the following error in Event Viewer:

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 9/2/2015 11:23:25 AM 
Event time (UTC): 9/2/2015 2:23:25 PM 
Event ID: 625b221bcebd42d3b17ec9efad99079e 
Event sequence: 105 
Event occurrence: 5 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/1/ROOT/ifvnetBeta-1-130856770159183370 
    Trust level: Full 
    Application Virtual Path: 
    Application Path: 
    Machine name: 

Process information: 
    Process ID: 3204 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\IFVNET_PRODBETA 

Exception information: 
    Exception type: HttpException 
    Exception message: Server cannot set status after HTTP headers have been sent.
   at System.Web.HttpResponse.set_StatusCode(Int32 value)
   at System.Web.HttpResponseWrapper.set_StatusCode(Int32 value)
   at System.Web.Mvc.HandleErrorAttribute.OnException(ExceptionContext filterContext)
   at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   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)



Request information: 
    Request URL: 
    Request path:  
    User host address: 191.182.161.49 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: IIS APPPOOL\IFVNET_PRODBETA 

Thread information: 
    Thread ID: 28 
    Thread account name: IIS APPPOOL\IFVNET_PRODBETA 
    Is impersonating: False 
    Stack trace:    at System.Web.HttpResponse.set_StatusCode(Int32 value)
   at System.Web.HttpResponseWrapper.set_StatusCode(Int32 value)
   at System.Web.Mvc.HandleErrorAttribute.OnException(ExceptionContext filterContext)
   at System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   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)

Custom Event Details:

I’ve already put the Response.BufferOutput = true; but still generates the log.

The worst is that after a while the pool hangs and the application stops returning.

Does anyone have any idea what I can do to solve this problem?

  • You just happened to use Response.Redirect in some method of Controller?

  • Yes, I did. But this error switches and even occurs in controllers without redirect.

1 answer

1

Use Response.Redirect is a bad deal on ASP.NET MVC. The chance of you causing collision of request headers is quite large.

Avoid using:

Response.Redirect("/ControllerQualquer", true);

Switch to:

return Redirect("/ControllerQualquer");
  • Gypsy, it worked in parts. Now let me ask you, javascript top.Location is also not recommended in MVC?

  • top.location does not have the ability to change the server-side request, so can use quiet.

  • Gypsy, the system has crashed again. And it is giving problem in a part that does not use Redirect.

  • With the same mistake or different mistakes?

  • Same error, and the controller that accuses the error is simple because it is not the home page

  • What exactly is running at the locking part?

  • It calls a model that checks if the user is logged in, reads an xml and returns the view by passing the XML content

  • return View(xml);?

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.