Atozed Forums
IIS ASPX 500 error on long post requests - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: IIS ASPX 500 error on long post requests (/thread-2090.html)



IIS ASPX 500 error on long post requests - JohBer - 11-02-2020

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



RE: IIS ASPX 500 error on long post requests - kudzu - 11-02-2020

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?


RE: IIS ASPX 500 error on long post requests - JohBer - 11-03-2020

(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?


RE: IIS ASPX 500 error on long post requests - kudzu - 11-03-2020

I will ask Alexandre to look at this.


RE: IIS ASPX 500 error on long post requests - JohBer - 11-10-2020

Any progress?


RE: IIS ASPX 500 error on long post requests - JohBer - 11-16-2020

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

Have you got a hold of Alexandre?


RE: IIS ASPX 500 error on long post requests - kudzu - 11-16-2020

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


RE: IIS ASPX 500 error on long post requests - Alexandre Machado - 11-17-2020

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.


RE: IIS ASPX 500 error on long post requests - JohBer - 11-17-2020

(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.


RE: IIS ASPX 500 error on long post requests - JohBer - 08-17-2021

Hello! Any updates on this?