473,320 Members | 1,876 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,320 software developers and data experts.

HttpContext.Current.Response.Redirect

Hi there

I have a program written by another company (it's a "web control" which
returns a web-page: can I compare this to a servlet in the Java world?),
which they think is causing problems on their server.

But no-one really knows if this program is at fault because the problem only
exhibits itself every once and a while, and the only thing they can see is
that their web-users suddenly stop receiving responses.

Anyway, at some points in this program it does this:
HttpContext.Current.Response.Redirect(redirect);
where redirect is a string which has the value "/style.css".

This causes an exception like:
Exception: System.Threading.ThreadAbortException
Message: Tråden var ved at blive afbrudt. (the thread was about to be
interrupted?)
Source: mscorlib
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
at System.Web.HttpResponse.Redirect(String url)
at InfoWeb.Net.FetchHandler.Handle(HttpRequest request, HtmlTextWriter
output)
at InfoWeb.Net.InfoWebControl.Render(HtmlTextWriter output)

What does it mean to redirect to a "css"? And what does the exception mean?
I don't really know if this is a part of the bigger problem because the
program continues quite happily afterwards - servicing requests.

Thanks,
Peter


Nov 17 '05 #1
1 15223
Peter Kirk wrote:
Hi there

I have a program written by another company (it's a "web control"
which returns a web-page: can I compare this to a servlet in the Java
world?), which they think is causing problems on their server.

But no-one really knows if this program is at fault because the
problem only exhibits itself every once and a while, and the only
thing they can see is that their web-users suddenly stop receiving
responses.
Anyway, at some points in this program it does this:
HttpContext.Current.Response.Redirect(redirect);
where redirect is a string which has the value "/style.css".

This causes an exception like:
Exception: System.Threading.ThreadAbortException
Message: Tråden var ved at blive afbrudt. (the thread was about to be
interrupted?)
Source: mscorlib
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)
at System.Web.HttpResponse.Redirect(String url)
at InfoWeb.Net.FetchHandler.Handle(HttpRequest request,
HtmlTextWriter output)
at InfoWeb.Net.InfoWebControl.Render(HtmlTextWriter output)

What does it mean to redirect to a "css"? And what does the exception
mean? I don't really know if this is a part of the bigger problem
because the program continues quite happily afterwards - servicing
requests.
Thanks,
Peter


This exception will occur if that redirect is done from within a try/catch.
This is expected behaviour. You can ignore it or (better) have that other
company move the redirect out of the try/catch.

A redirect to a css looks odd, but is not impossible. The question is
*why* does it do that redirect.

By the way: a better place to post aspnet related questions is in the
microsoft.public.dotnet.framework.aspnet group.

Hans Kesting
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Keith Patrick | last post by:
After completely giving up on finding some way in my ASP.Net app to take a query string URL and redirect to it as a POST instead, I went with a system like so: Upon "redirection," all the...
2
by: | last post by:
Today I learned that creating cookies inside of a custom class in ASP.NET 2.0 requires that you prefix it with HttpContext.Current..., e.g. : ...
3
by: asanford | last post by:
I want to create an ASP.NET web application that receives a form POST message, inspects the data, and reroutes the request to one of many different servers. I wrote an IHttpModule which...
7
by: Hardy Wang | last post by:
Hi, I have a web application, code of ASPX page needs to call one static method in another class which does not inherit System.UI.Page class using System.Web; public class Utils { public...
1
by: Torfi | last post by:
Hello all I've got a very weird situation I need help with. I'm building a solution where I have custom components in a web content management system using a web store library (API in DLLs). The...
0
by: Aaron Morton | last post by:
I'm working on a IHttpModule that handles the PreSendRequestHeaders event from the HttpApplication, if the event is raised after EndRequest then HttpContext.Current is null. If it is raised before...
2
by: Doogie | last post by:
What is the difference between this: HttpContext.Current.Response and this: System.Web.HttpApplication.Response I want to create a common method in a .vb file and cannot use...
2
by: =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post by:
Hi, I'm using Threads, and when I try to do Server.Transfer, I recieved an error. (child object does not exist...) My Code: Dim t As New Thread(AddressOf Hilo) Private Sub Hilo()...
0
by: alister7 | last post by:
hi every1 im trying to download a music file from the database SQLserver.which i upload in the database.. The Code below works fine in wen i create a new project of an ASP.Net web application..m...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.