468,110 Members | 1,821 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

HttpHandler and Response.Redirect

Jed
I have written an HttpHandler which I invoke through an ashx page.

The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page.

Everything up to the redirect works fine, but I can't get the redirect to work.

If I do a ...
context.Response.Write("Hello World");
.... the HttpHandler works great and the browser loads the text fine,
but if I change it to ...
context.Response.Redirect("/filepath/file.htm");
.... the browser just spins and spins like it is trying to load something but nothing every does.

The redirect URL does show up in the status bar, and the URL is valid, but nothing ever loads!

I have tried Server.Transfer and Server.Execute and they exhibit the same behavior. Does anybody know what might be going on?
Nov 18 '05 #1
3 6475
Stupid question here, have you tried loading file.htm manually ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"Jed" <Je*@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
I have written an HttpHandler which I invoke through an ashx page.

The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page.
Everything up to the redirect works fine, but I can't get the redirect to work.
If I do a ...
context.Response.Write("Hello World");
... the HttpHandler works great and the browser loads the text fine,
but if I change it to ...
context.Response.Redirect("/filepath/file.htm");
... the browser just spins and spins like it is trying to load something but nothing every does.
The redirect URL does show up in the status bar, and the URL is valid, but nothing ever loads!
I have tried Server.Transfer and Server.Execute and they exhibit the same behavior. Does anybody know what might be going on?

Nov 18 '05 #2
Check this out...

http://pubs.logicalexpressions.com/P...cle.asp?ID=214

....as it may be that the use of the HttpHandler may be where the
conflict is occurring with the way the Response.Redirect actually
functions when it imputes metadata into the header of the response.
--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/



"Jed" <Je*@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
I have written an HttpHandler which I invoke through an ashx page.

The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page.
Everything up to the redirect works fine, but I can't get the redirect to work.
If I do a ...
context.Response.Write("Hello World");
... the HttpHandler works great and the browser loads the text fine,
but if I change it to ...
context.Response.Redirect("/filepath/file.htm");
... the browser just spins and spins like it is trying to load something but nothing every does.
The redirect URL does show up in the status bar, and the URL is valid, but nothing ever loads!
I have tried Server.Transfer and Server.Execute and they exhibit the same behavior. Does anybody know what might be going on?

Nov 18 '05 #3
Jed
Yep. The page does load manually.

One thing I left out, which has now become relevant is that I am initiating the call to the HttpHandler through a post from an acrobat pdf file.

I tried posting to the handler from an html form and the redirect works fine. So I guess it has something to do with the post from the pdf, though I have no clue why it would make a difference.

I tried declaring the Response.ContentType in the HttpHandler to make sure there wasn't any confusion about the Response there, but that didn't work.

It's still weird that Response.Write works but redirect doesn't. And also weird that I can't use Server.Execute with Response.Write to output the confirmation page. No attempt to get to that file from the HttpHandler works if the post if from a pdf.

"One Handed Man ( OHM - Terry Burns )" wrote:
Stupid question here, have you tried loading file.htm manually ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"Jed" <Je*@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
I have written an HttpHandler which I invoke through an ashx page.

The HttpHandler does various things to process the request, then it is

supposed to redirect to a confirmation page.

Everything up to the redirect works fine, but I can't get the redirect to

work.

If I do a ...
context.Response.Write("Hello World");
... the HttpHandler works great and the browser loads the text fine,
but if I change it to ...
context.Response.Redirect("/filepath/file.htm");
... the browser just spins and spins like it is trying to load something

but nothing every does.

The redirect URL does show up in the status bar, and the URL is valid, but

nothing ever loads!

I have tried Server.Transfer and Server.Execute and they exhibit the same

behavior. Does anybody know what might be going on?


Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dale Ragan via .NET 247 | last post: by
6 posts views Thread by Sam | last post: by
8 posts views Thread by bryan | last post: by
2 posts views Thread by MilanB | last post: by
reply views Thread by Mike Lowery | last post: by
5 posts views Thread by hawkeye parker | last post: by
6 posts views Thread by Mike | last post: by
5 posts views Thread by Author | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.