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?

user1782982
1#
user1782982 Published in 2017-12-07 19:08:26Z

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.302726 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO