Home > Blockchain >  Slow download issue on .Net Web Form Application using Microsoft Edge
Slow download issue on .Net Web Form Application using Microsoft Edge

Time:07-22

I have a .net web form application (.net framework 4.7.2).

It runs on intranet. Files downloaded from my application are very slow using Microsoft Edge.

  • User edge version is 103.x
  • Other intranet web application (not managed by me) works fine
  • My edge version is 100.x and it works fine. Files are downloaded immediately

In my application there are different code blocks to manage download .. like this

Response.AddHeader("Content-disposition", "attachment; filename=foo.txt");
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(myContentByteArray);
Response.End();

or

Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "attachment; filename=foo.txt");
Response.OutputStream.Write(myContentByteArray, 0, myContentByteArray.Length);
Response.OutputStream.Flush();
Response.OutputStream.Close();
Response.End();

or

Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "attachment; filename=foo.txt");
Response.OutputStream.Write(myMemoryStream.GetBuffer(), 0, myMemoryStream.GetBuffer().Length);
Response.OutputStream.Flush();
Response.OutputStream.Close();
Response.End();

or

Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/vnd.xls";
Response.AddHeader("Content-disposition", "attachment; filename=foo.xls");
Response.AddHeader("Content-Type", "application/Excel");
Response.AddHeader("Content-Length", myFile.Length.ToString());
Response.WriteFile(myFile.FullName);
Response.End();

I suppose that is a client issue (some security policies or other specific configuration).

But I should consider that my backend code is wrong.

Has anyone encountered the same problem?

Please may you help me?

CodePudding user response:

That's an issue with Edge 103. Microsoft have became aware of the problem and started investigating. You can wait for the release of a new version of Edge.

Now we have a workaround: Setting the policy of NewSmartScreenLibraryEnabled=0 (or SmartScreenEnabled=0) will avoid the problem.

  • Related