IIS ASPX 500 error on long post requests

<< Click to Display Table of Contents >>

Navigation:  Forum >

IIS ASPX 500 error on long post requests

Forum link

 


 

11-02-2020, 12:25 PM:

 

IW version: 15.2.18.

 

We get the below error on long post requests (more than 80 kb).

 

Seems like a file handle is opened without being closed.

 

Code:

 

[Exception: HttpExecute error: Cannot open file "D:\local\Temp\tmp99A1.tmp". The process cannot access the file because it is being used by another process]

 

   IntraWeb.MainController.ProcessAppMode() +339

 

   IntraWeb.MainController.Index() +68

 

   lambda_method(Closure , ControllerBase , Object[] ) +62

 

   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14

 

   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +182

 

   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27

 

   System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28

 

   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10

 

   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50

 

   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32

 

   System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58

 

   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +228

 

   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10

 

   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50

 

   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34

 

   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24

 

   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99

 

   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50

 

   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27

 

   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14

 

   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16

 

   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50

 

   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36

 

   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16

 

   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50

 

   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26

 

   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10

 

   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25

 

   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16

 

   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50

 

   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28

 

   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9

 

   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9847873

 

   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50

 

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

 

 

 


 

11-02-2020, 03:49 PM:

 

This is most often caused by hyper active antivirus programs. You can use one of the sys internals tools to find out what process has the files locked.

 

What anti virus program are you using?

 


 

11-03-2020, 09:57 AM:

 

(11-02-2020, 03:49 PM)kudzu Wrote: [ -> ]This is most often caused by hyper active antivirus programs. You can use one of the sys internals tools to find out what process has the files locked.

 

What anti virus program are you using?

 

No antivirus installed on any of the machines we've tried (aside from windows defender perhaps). The file is locked by the IIS process (w3wp.exe) as expected.

 

I've attached a very simple example which demonstrates the problem. A post request with a payload of more than around 80000 bytes fails with:

 

Code:

 

HttpExecute error: Cannot open file "%TEMP%\tmpD173.tmp"

 

 

 

Are you able to make these kinds of requests yourself?

 


 

11-03-2020, 06:55 PM:

 

I will ask Alexandre to look at this.

 


 

11-10-2020, 02:38 PM:

 

Any progress?

 


 

11-16-2020, 12:27 PM:

 

(11-03-2020, 06:55 PM)kudzu Wrote: [ -> ]I will ask Alexandre to look at this.

 

Have you got a hold of Alexandre?

 


 

11-16-2020, 06:32 PM:

 

I will check with him again, but I believe he was looking into it already.

 


 

11-17-2020, 09:45 AM:

 

I'm looking into this but I don't have any response so far.

 

About Windows Defender, I suggest that you read this post:

 

https://www.atozed.com/2016/01/20160604a-en/

 

It may not be responsible for the issue here but it certainly should be disabled in whatever folder your application is using as temporary storage.

 


 

11-17-2020, 02:06 PM:

 

(11-17-2020, 09:45 AM)e Alexandre Machado Wrote: [ -> ]I'm looking into this but I don't have any response so far.

 

About Windows Defender, I suggest that you read this post:

 

https://www.atozed.com/2016/01/20160604a-en/

 

It may not be responsible for the issue here but it certainly should be disabled in whatever folder your application is using as temporary storage.

 

I've tried on multiple machines, with and without antivirus on. It consistently appears when POST-ing large requests to Intraweb applications built as ASPX-dlls running on IIS. Even with the tiny test application I attached earlier.

 


 

08-17-2021, 12:31 PM:

 

Hello! Any updates on this?