Rohit Sharma

Rohit Sharma

  • 1.7k
  • 57
  • 1.5k

Does form dot submit of javaScript hits http handler in asp.

Nov 21 2016 12:54 AM
Hello,
I am developing ASP.NET MVC 5 application. Am using javaScript POST method to submit form to my MVC Controller. It is typically uploading a file to server. I have multiple of pages from where am uploading files. Files could be images documents etc. I want to add some common custom functionality before uploading file say i want to check the file size. This is not possible on client side as some of clients using browsers not support HTML5. When am trying to upload a large file then IIS send back the request as 404.13 (content length is large). It does not hit my controller. I tried creating HTTPHandler and RouteHandler as it is an MVC application. But both did not work. Can anybody please suggest how I can create a http handler for this ?

Answers (1)