Response.Redirect corrupting redirect URL
-
I am trying to Response.Redirect to another web application but ASP.NET keeps corrupting the URL. Example, if i am at "http://localhost/application1/main.aspx" and i do redirect to "http://localhost/application2/default.aspx" the redirected url will become "http://localhost/http://localhost/application2/default.aspx". It is as if ASP.NET is guessing that i am redirecting using partial URL, but i am not. How does one fix this?
-
I am trying to Response.Redirect to another web application but ASP.NET keeps corrupting the URL. Example, if i am at "http://localhost/application1/main.aspx" and i do redirect to "http://localhost/application2/default.aspx" the redirected url will become "http://localhost/http://localhost/application2/default.aspx". It is as if ASP.NET is guessing that i am redirecting using partial URL, but i am not. How does one fix this?
-
I am trying to Response.Redirect to another web application but ASP.NET keeps corrupting the URL. Example, if i am at "http://localhost/application1/main.aspx" and i do redirect to "http://localhost/application2/default.aspx" the redirected url will become "http://localhost/http://localhost/application2/default.aspx". It is as if ASP.NET is guessing that i am redirecting using partial URL, but i am not. How does one fix this?
If you wanna redirect to another web application url. you need add "http://" at the beginning. Response.Redirect("http://localhost/application2/default.aspx");
-
In the click event of a form button i have VB "Response.Redirect(url string)" It is really quite simple. The string i pass is what i described in my initial posting, it is a complete "http://" string. It appears that ASP.NET and/or the IIS server is disregarding the "http://" part and assuming that i am making a relative reference and so adds the redirect url to the server root url, as i describe in my initial post. I tried doing workaround by calling a html web form and use javascript to automatically submit it and the form submit creates the same url corruption. Funny thing about this, this redirect url corruption only occurs when calling different web applications that are in the same domain, such as "http://server1/application1" and "http://server1/application2". If i call a web application on "http://server2/" instead of "http://server1/" i do not experience this. As i mentioned, the corruption does not occur all the time, but frequently enough to be a major issue. So far i have found no solution or workaround. I may have to contact Microsoft technical support on this one.