2

There has been a very similar question asked almost two years ago, but never solved, and now I'm running into what seems like the same exact issue with MVC 4 in IE9. I have a test site set up as plainly as possible. When I run it, it seems to work just fine. All the css is loaded, all the scripts imported, etc. But when I click the back button, virtually everything goes away.

Now, the virtually everything is an important note because a mostly static layout (with the exception of an @{ Html.RenderPartial("_MyNavPartial") } and a @RenderBody() call) returns nothing at all while another page that has a table populated with data from a service call still returns the data, with the css formatting applied to it no less. But the navigation partial is gone, and so are all of the css settings for the table's alignment on the page. When I refresh the page, it all comes back.

According to Fiddler, when the back button is hit, nothing at all comes back and viewing source shows nothing but basic markup with no content at all. The page with the table shows only the table and the css ids although the id applied to the <body> disappears.

I've tried disabling caching, changing the @Url.ActionLink() calls to @Url.Action() and even static URLs just to see if some dynamic content was in the way, and still have the exact same problem. Again, this only applies to IE9. Everything works perfectly fine in Chrome and Firefox, which makes me think there's some sort of setting that's off. What could it possibly be? Thanks ahead everyone!

Community
  • 1
  • 1
gfish3000
  • 1,517
  • 1
  • 11
  • 17
  • 3
    Since you cannot read delete answers with your reputation score, there is an answer on your linked question that says "I had the same problem. I changed to using IISExpress from the dev environment and the problem disappeared. Possibly it's an IE issue with the standard Visual Studio dev web server." – Uwe Keim Apr 25 '13 at 14:19
  • when you say *nothing at all comes back* so a request is sent but no response is returned from the server? – Liam Apr 25 '13 at 14:20
  • Don't know MVC in-deep; could this be an issue with browser detection as [described by Scott Hanselman](http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx)? – Uwe Keim Apr 25 '13 at 14:20
  • @UweKeim __doPostBack is ASP.Net not MVC so it's not the issue in Hanselman's blog – Liam Apr 25 '13 at 14:22
  • 3
    @UweKeim, thanks for the tip! I was using IISExpress by default so I tried it with Cassini (the VS default server) and IIS 7.5 and both environments worked just fine. Now I'd like to know what could possibly cause this sort of behavior on IISExpress. There's nothing in the .config files that jumps out at me... – gfish3000 Apr 25 '13 at 14:30
  • @Liam, with IISExpress, there's no response showing up in Fiddler but that's can't be right because I can view source and there's something there. Thanks to UweKeim, I got it running with the default VS server and on IIS, but why IISExpress is behaving so weirdly is still something I'd like to try and figure out before this post is marked as solved. – gfish3000 Apr 25 '13 at 14:51

0 Answers0