ASP.NET Response.Redirect no longer works with relative URL in Windows 7.
Posted on 2011-09-26
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.