I know this answer is late, but I hope my experience can help someone. In my case, the error occurred while using Plesk shared hosting. I had created an Excel template and pre-formatted thousands of rows in print preview, preparing for a large data export. However, the error disappeared once I removed the formatting. I add the formatting in C# during exporting of the data.