TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nepethya Rana
NA
335
152.1k
Exception Message : Thread was being aborted.
Oct 12 2017 2:30 PM
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();
Reply
Answers (
1
)
Migrtaion tool for migrating application
How do i pass date from ajax to my method in mvc?