-1

I'm facing this strange problem: I've deployed an ASP.NET MVC project in which you have to set the start date, the end date and press a button to get the results in a file. The button executes a sql stored procedure, the results are saved in a .xlsx file with OLEDB and the file is returned to the client.

All works fine in test (with IIS Express), but when I release into the production environment (IIS 7.5), i get the issue: for example in test, setting the dates with a difference of a year between them, i got a file result of 5MB filled but if i try the same in the production environment than i got back an empty file with 10KB size. But if i reduce the difference between the dates and get a returned file from test with size lower than 1MB, in production the file result will be filled correctly and with the same size and values as in test.

No error is returned from the IIS and the server has enough disk space and memory.

I've tried to deploy the project to another server (always with IIS 7.5) but I get the same results.

The query takes 2 seconds to complete, and all the process ends in 20 seconds.

I don't know what to do nor what to check, can anyone help me? Has IIS some kind of size limits on file written on server?

  • What if the date interval is more than a year in production environment? Is the file still empty and samller than 10KB? – Bruce Zhang Nov 13 '20 at 01:44
  • Hi Bruce, in test i always get the correct result from where i see what the file size will be, so yes the file will be greater but in production will still return an empty 10KB file and IIS doesn't throw any error – Alessandro Nov 13 '20 at 07:47

1 Answers1

0

Solved, the problem was not IIS but the user that runs the site who doesn't had the permissions to access to the Temporary Internet Files folder as this thread explains:

Microsoft ACE OLEDB connection creating empty Excel when there are 166,110 rows

Thank you all for the help