Application.Download MemoryStream

Answered
0
0

Hi,

when I try to perform a download on the web server (IIS10) using the method below, I only get an empty file. Locally in VS with IIS-Express it works fine.
What permissions are necessary on the Server?

Method:
public static void DownloadAndSave(DataView dtData, string FileName)
{
string data = ExportDataToCSV(dtData.ToTable());
MemoryStream myStream = new MemoryStream(System.Text.Encoding.Unicode.GetBytes(data));
Application.Download(myStream, FileName);
AlertBox.Show($”Die CSV-Datei ‘{FileName}’ wurde erfolgreich heruntergeladen!”, MessageBoxIcon.Information, null, System.Drawing.ContentAlignment.MiddleCenter, 6000);
}

THX,

Stephan

  • You must to post comments
Best Answer
0
0

Hi Stephan

Testing in a IIS into web machine from our side, all works fine

We suggest you that check for permission in directory /temp on your IIS machine.

Regards

  • You must to post comments
0
0

That’s it! The iis users had read only permissions on the temp folder.

Thx and merry christmas

Stephan

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.