By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,533 Members | 2,102 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,533 IT Pros & Developers. It's quick & easy.

HttpHandler and Response.Redirect

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.