Home How to abort too long HTTP request before it finishes in ASP.NET MVC application?
Reply: 0

How to abort too long HTTP request before it finishes in ASP.NET MVC application?

user767
1#
user767 Published in July 16, 2018, 6:40 am

I have a simple page with ajax uploader component. When I add file, controller method is called that saves file.

security/requestFiltering/requestLimits, maxAllowedContentLength and httpRuntime.maxRequestLength values are set

Expected result: request is cancelled immediately if upload of big file is started with any error response.

Actual behaviour: file upload request is (slowly) finished, error response is returned.

Is there any simple way (without writing my own HTTP request handling component) to stop and cancel request before its big body was sent?

(idea is to avoid unnecessary load on both browser and server that work on request that will be failed anyway)

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.34021 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO