473,394 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Thread was being aborted.

This is J.Alexander, I am trying to redirect to another page on my program. it is working well. but, it is raising error on try .... Catch block like this "Thread was being aborted."


How do avoid this exceptions. please any one help me. it is very urgent...

Below i given the code..

Try
sTimeQuery = "UPDATE TBLLOGIN SET LASTLOGEDIN=@LASTLOGEDIN WHERE USERID=" & Session("iUserId")
sTimeCmd.CommandType = CommandType.Text
sTimeCmd.CommandText = sTimeQuery
sTimeCmd.Connection = sConnn
sTimeCmd.Parameters.Add("@LASTLOGEDIN", SqlDbType.VarChar, 50).Value = Now.Date & " " & Now.Hour & ":" & Now.Minute
sConnn.Open()
sTimeCmd.ExecuteNonQuery()
sConnn.Close()
Response.Redirect("admin/SubAdminFirst.aspx")
Catch ex As Exception
Dim Err As New CreateLogFile
Err.ErrorLog(Server.MapPath("Logs/ErrorLog"), ex.Message)
End Try
Sep 28 '06 #1
1 2461
Try to use

Response.Redirect("admin/SubAdminFirst.aspx","False")

with in try catch block

Thanks
Satya


This is J.Alexander, I am trying to redirect to another page on my program. it is working well. but, it is raising error on try .... Catch block like this "Thread was being aborted."


How do avoid this exceptions. please any one help me. it is very urgent...

Below i given the code..

Try
sTimeQuery = "UPDATE TBLLOGIN SET LASTLOGEDIN=@LASTLOGEDIN WHERE USERID=" & Session("iUserId")
sTimeCmd.CommandType = CommandType.Text
sTimeCmd.CommandText = sTimeQuery
sTimeCmd.Connection = sConnn
sTimeCmd.Parameters.Add("@LASTLOGEDIN", SqlDbType.VarChar, 50).Value = Now.Date & " " & Now.Hour & ":" & Now.Minute
sConnn.Open()
sTimeCmd.ExecuteNonQuery()
sConnn.Close()
Response.Redirect("admin/SubAdminFirst.aspx")
Catch ex As Exception
Dim Err As New CreateLogFile
Err.ErrorLog(Server.MapPath("Logs/ErrorLog"), ex.Message)
End Try
Sep 29 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Johanna | last post by:
Hello, Thread was being aborted exception is thrown by my asp.net application. I hope someone could help me with this error that I get in windows 2003 server. This error has not occured with...
3
by: Johanna | last post by:
Hello, Thread was being aborted exception is thrown by IIS for my asp.net application on win2003 server. This error has not yet occured with the same asp.net application on windows 2000...
1
by: Keith F. | last post by:
Hi, I have an asp.net web app that is intermittently throwing "Thread was being aborted." errors in my data access component. This seems to occur when the app is under a heavier than normal load....
3
by: Keith F. | last post by:
Hi, I have an asp.net web app that is intermittently throwing "Thread was being aborted." errors in my data access component. This seems to occur when the app is under a heavier than normal load....
1
by: Josef K. | last post by:
I've started getting "Thread was being aborted" errors. This errormessage has me puzzled. I'm using the same very simple approach throughout the application, and it works elsewhere: -- my aspx...
5
by: Jimi | last post by:
Hi all, I have a user control which raises an event to the parent page when a person clicks on a link in a datagrid. In the event handler inside the parent page I construct a url to redirect to...
4
by: Totto | last post by:
Hi, I'm doing a server.transfer from a click event of a button, but an exception is raised with "Thread was being aborted" Anyone know why? Thanks Tor
9
by: esakal | last post by:
Hello, I'm programming an application based on CAB infrastructure in the client side (c# .net 2005) Since my application must be sequencally, i wrote all the code in the UI thread. my...
2
by: Daniel Knöpfel | last post by:
Hi I am develloping an asp.net 2.0 application. For some tasks (daily notifications to users via email), we use background threads. I rather have this task as background thread of the asp.net...
1
by: malu | last post by:
Hi I faced one exception when use the thread in c#. I start the thread in a class.Then i start the thread thru the main method constructor.In that thred i use the thred.sleep() method. Then...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.