467,903 Members | 1,811 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,903 developers. It's quick & easy.

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
  • viewed: 14451
Share:
1 Reply
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Keith Patrick | last post: by
3 posts views Thread by asanford | last post: by
7 posts views Thread by Hardy Wang | last post: by
1 post views Thread by Torfi | last post: by
reply views Thread by Aaron Morton | last post: by
2 posts views Thread by =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.