Solved

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

Posted on 2011-09-26
3
1,036 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now