Solved

ASP.NET Response.Redirect no longer works with relative URL in Windows 7.

Posted on 2011-09-26
3
1,043 Views
Last Modified: 2012-05-12
ASP.NET Response.Redirect no longer works with relative URL in Windows 7. I have an asp.net web 'application' (not website), that when I switch to use the 'virtual/casini' web server, the response.redirect no longer redirects to a relative url.

The response.redirect code simply resides in the click event handler in the asp.net's code behind - nothing special - and this previously worked in my dev environment when it was on WinXP.

For example: Response.Redirect("home.aspx"); will just trigger the browsers search screen (in both IE and Chrome, the only two I've tried). I get this problem in both VS2008 and VS2010. It seems to be Windows 7 related (I get this result in both Windows 7 home premium and ultimate).

Interesting, I don't have this problem if I use the actual local IIS 7 web server(on my version of Win7 Ultimate). But Casini and IIS 7.5 Express both have this wierd problem with response.redirect. Which, now that I think of it - maybe installing IIS 7.5 express caused an issue as I haven't tried it on Win7 yet without installing that.

Anyone else run into this problem? I selected 500 points because this seems to be a really obscure problem that not to many people may have come across.
0
Comment
Question by:PurdueGuy531
  • 2
3 Comments
 
LVL 12

Expert Comment

by:serchlop
ID: 36602233
You have to add the site URL to Secure sites in IE, this problem is related about security improvements in Internet Explorer 8 and forward. I think that with Firefox or another browser this problem is not present.
0
 

Accepted Solution

by:
PurdueGuy531 earned 0 total points
ID: 36602365
Nevermind. Turns out the way the code was written, and how it checks and processes URL's is completely different if you use the virtual and IIS express servers vs the full blown IIS for hosting. The navigating incorrectly with response.redirect was just a symptom of this. Really wierd that the relative URL's I'm getting are so different from IIS vs virtual (as in the page name not even showing up, etc).

0
 

Author Closing Comment

by:PurdueGuy531
ID: 36895908
Found the answer.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question