Сообщение об исключении: поток прерывался.
Exception Message : Thread was being aborted. I am getting above exception when running the application in prod server. I never get that exception in dev and in test environment. Could any please help me out. If there is anything wrong in the code. My code in vb. Try Dim filePath As String = Request.QueryString("fn") Response.ContentType = ContentType Response.AppendHeader("content-disposition", "attachment; filename=" + Path.GetFileName(filePath)) Response.TransmitFile(filePath) Response.Flush() System.Threading.Thread.Sleep(1000) If File.Exists(filePath) Then File.Delete(filePath) End If Response.End() Catch ex As Exception oUtility.WriteLog("Exception Message : " + ex.Message, True) vm.stat = 2 vm.message = "Internal server error" Throw End Try My code in C# string filePath = Request.QueryString["fn"]; Response.ContentType = ContentType; Response.AppendHeader("content-disposition", "attachment; filename=" + Path.GetFileName(filePath)); Response.TransmitFile(filePath); Response.Flush(); System.Threading.Thread.Sleep(1000); if (File.Exists(filePath)) { File.Delete(filePath); } //response.writefile(filepath) Response.End();
Что я уже пробовал:
Я попытался запустить приложение в среде dev. У меня никогда не было этой проблемы. Я не мог воспроизвести ошибку.