Found a nasty little bug in ASP.NET 1.1 this morning. Once again I’m documenting it for my personal archives and the Googlers.
This one results from using a combination of Response.Redirect, SmartNavigation and secure (HTTPS) connections. The page in question was designed to save changes, then redirect to the original calling page, so the contents of the event called from the Save button did something like:
SaveData(); Response.Redirect( myCallingPageURL );
This worked perfectly on the dev box, but when migrated to the test machine, it resulted in a blank page, with the address still set to the original page. Debug output proved that the
Response.Redirect call was being made correctly. The only difference was that the test machine was configured to use SSL (HTTPS), and the dev machine was not.
After a bit of Googling, I found the answer right here. The culprit was the
SmartNavigation property on the page.
SmartNavigation seems to bugger up
Response.Redirect when using a HTTPS connection, as we witnessed. Thankfully the solution is pretty simple, and does not require disabling
SmartNavigation for the whole page life. You just need to do it prior to calling the
Response.Redirect like so:
SaveData(); this.SmartNavigation = false; Response.Redirect( myCallingPageURL );