The maximum request length has no bearing on a timeout error. If you try to upload a file that's too large, you'll get a 404 error,
not a timeout error.
Quote:
I am reading excel file and convert it into datable and save excel into another folder its hardly take 1 min 20 sec
...
I take datatable and pass into sqlbulkcopy and insert into table ,return with only success msg it hardly get 1 min and few sec
So your total execution time is somewhere over 2 minutes 20 seconds - ie: more than 140 seconds.
The default execution timeout depends on your application:
.NET Framework:
WebForms and synchronous MVC actions: 110 seconds.
Asynchronous MVC actions: 45 seconds.
.NET Core:
120 seconds.
All of those numbers are way below the length of time you've told us your code takes to execute.
If you can't get your code to run faster, you need to increase the execution timeout limit.
.NET Framework
WebForms and synchronous MVC actions:
In web.config, set
configuration/system.web/httpRuntime/@executionTimeout
to the number of seconds required - eg:
300
Asynchronous MVC actions:
Add
the AsyncTimeout attribute[
^] to your action, and specify the number of milliseconds required - eg:
[AsyncTimeout(300_000)]
.NET Core
In web.config, set
configuration/system.webServer/aspNetCore/@requestTimeout
to the required time - eg:
00:05:00
.