I'm getting timeout error while importing large number of fields from CSV file. While importing it refers the timeout which is configured in
We cannot predict the number of fields from CSV file, some times a large number files will be processing in live environment. I wanted to set Maximum time out in this import logic until it reaches the end of the file. Our client will not mind the time which we configured for import logic, our goal should import all the fileds without time out error.
In googling, I found that we can set a timeout through the following statement with the specified duration,
HttpContext.Current.Server.ScriptTimeout = 360;
But we cannot predict the time which required for importing the large CSV file. How we can configure the maximum timeout through C# code, instead of setting through web.config.
Thanks in Advance!!
Use this Code in Web.config file to Increase ExecutionTimeOut: