Response.Redirect from SSL to non SSL with port drops port.

S

Sean Wolfe

I have this wierd bizarrre problem that I'm experienceing with the
Response.Redirect() method.

I have a site where the users are on a particular page in SSL. When they
post the data back, and the processing is done, it then tries to
redirect them back to the non-SSL site. But the site is on a
non-starndard port number. I place in the Response.Redirect() method the
Fully qualified path to the URL and when ASP.NET makes the Response, the
response drops the port number, therefore redirecting the user to a 404.

For example:
Users are on a page:
https://www.somefqd.com/selectCustomer.aspx?blahblah=blahblah

they post back some data, and then the aspx page process the data, and
then a call to Response.Redirect()

Response.Redirect("http://www.somefqd.com:8080/default.aspx");

What I end up seeing, using fiddler, the request ends up being
http://www.somefd.com/default.aspx.

It's quite strange, becuase I even drop into the debug code and make
sure that the string passed to Response.Redirect is the fully qualified
path. Any idea's on what is happening here?

Sean
 
J

Joerg Jooss

Sean said:
I have this wierd bizarrre problem that I'm experienceing with the
Response.Redirect() method.

I have a site where the users are on a particular page in SSL. When
they post the data back, and the processing is done, it then tries to
redirect them back to the non-SSL site. But the site is on a
non-starndard port number. I place in the Response.Redirect() method
the Fully qualified path to the URL and when ASP.NET makes the
Response, the response drops the port number, therefore redirecting
the user to a 404.

For example:
Users are on a page:
https://www.somefqd.com/selectCustomer.aspx?blahblah=blahblah

they post back some data, and then the aspx page process the data,
and then a call to Response.Redirect()

Response.Redirect("http://www.somefqd.com:8080/default.aspx");

What I end up seeing, using fiddler, the request ends up being
http://www.somefd.com/default.aspx.

It's quite strange, becuase I even drop into the debug code and make
sure that the string passed to Response.Redirect is the fully
qualified path. Any idea's on what is happening here?

Actually, this problem is not that bizarre. I've been there twice
already ;-)

This will happen for example
- if the HTTP Location header produced by the redirecting code is
accidentally relative or
- a firewall or proxy incorrectly translates port numbers from an
internal network to the Internet or vice versa.

I suggest to ask your networking guys to help you with this.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top