Click here to Skip to main content
16,008,719 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionSubmit data from a htm file to aspx file Pin
anujose4-Apr-07 21:16
anujose4-Apr-07 21:16 
AnswerRe: Submit data from a htm file to aspx file Pin
gauthee4-Apr-07 21:27
gauthee4-Apr-07 21:27 
AnswerRe: Submit data from a htm file to aspx file Pin
N a v a n e e t h4-Apr-07 22:39
N a v a n e e t h4-Apr-07 22:39 
GeneralRe: Submit data from a htm file to aspx file Pin
anujose4-Apr-07 23:18
anujose4-Apr-07 23:18 
QuestionFormsAuthentication Pin
Mkanchha4-Apr-07 20:38
Mkanchha4-Apr-07 20:38 
AnswerRe: FormsAuthentication Pin
Walter_H4-Apr-07 23:02
Walter_H4-Apr-07 23:02 
GeneralRe: FormsAuthentication Pin
Mkanchha4-Apr-07 23:48
Mkanchha4-Apr-07 23:48 
GeneralRe: FormsAuthentication Pin
Walter_H5-Apr-07 1:27
Walter_H5-Apr-07 1:27 
As I said before, you have to catch System.Threading.ThreadAbortException. ThreadAbortException is thrown exactly after you do a Response.Redirect. This is normal and it's because the .NET-Framework informs itself that the current thread is beeing aborted. Your problem was that you generally catch every type of exception. Instead you must catch the ThreadAbortException BEFORE you catch any other Exception types. Before you go on, take a look on the documentation of "System.Threading.ThreadAbortException", afterwards it will be clear why you get the message "Thread was being aborted."

so change your code to this:

Try
'call the ValidateLogin function
If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then
If Request.Params("ReturnUrl") <> "" Then
FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True)
Else
If iStatus = 1 Then
Response.Redirect("EntrySubscriberDtls.aspx")
Else
Response.Redirect("ViewSubscriberDtls.aspx")
End If
End If
Else
Response.Redirect("VendorLogin.aspx", True)
lblErrorMsg.Text = "Invalid UserName or Password"
End If

Catch ex as System.Threading.ThreadAbortException
' Do nothing here, just catch the exception


Catch ex As Exception

'Throw error Message
lblErrorMsg.Text = ex.Message
End Try

hope that helps
- walter
QuestionWSE 2.0 Credential Passing Technique vs Integrated Windows Authentication Pin
lokeshgupta134-Apr-07 20:09
lokeshgupta134-Apr-07 20:09 
Question[Anthem:AutoSuggestBox] Pin
samshah5124-Apr-07 20:04
samshah5124-Apr-07 20:04 
QuestionHow to Write this Query Pin
varshavmane4-Apr-07 19:46
varshavmane4-Apr-07 19:46 
AnswerRe: How to Write this Query Pin
Sun Rays4-Apr-07 19:57
Sun Rays4-Apr-07 19:57 
GeneralRe: How to Write this Query Pin
varshavmane4-Apr-07 20:07
varshavmane4-Apr-07 20:07 
AnswerRe: How to Write this Query Pin
RaghuSanta4-Apr-07 20:01
RaghuSanta4-Apr-07 20:01 
GeneralRe: How to Write this Query Pin
varshavmane4-Apr-07 20:07
varshavmane4-Apr-07 20:07 
AnswerRe: How to Write this Query Pin
Shahzad.Aslam5-Apr-07 1:48
Shahzad.Aslam5-Apr-07 1:48 
QuestionHow to creat a Multi-line grid ? Pin
vnsp4-Apr-07 19:42
vnsp4-Apr-07 19:42 
AnswerRe: How to creat a Multi-line grid ? Pin
Sun Rays4-Apr-07 19:58
Sun Rays4-Apr-07 19:58 
QuestionPayment gateway Pin
www.suniltvl.in4-Apr-07 19:28
www.suniltvl.in4-Apr-07 19:28 
AnswerRe: Payment gateway Pin
Narendra Mohan4-Apr-07 19:40
Narendra Mohan4-Apr-07 19:40 
AnswerRe: Payment gateway Pin
N a v a n e e t h4-Apr-07 22:40
N a v a n e e t h4-Apr-07 22:40 
Questionreading contents of a word document and displaying it on web page Pin
keroed_edmond4-Apr-07 16:36
keroed_edmond4-Apr-07 16:36 
AnswerRe: reading contents of a word document and displaying it on web page Pin
meeram3954-Apr-07 20:23
meeram3954-Apr-07 20:23 
QuestionBinding aSystem.Drawing.Bitmap to a GridView's column. Pin
Theta324-Apr-07 15:46
Theta324-Apr-07 15:46 
QuestionBinding a System.Drawing.Bitmap to a GridView column. Pin
Theta324-Apr-07 15:44
Theta324-Apr-07 15:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.