Last month , we had a tough situation with one of our client projects which is developed in MVC 4 and it has got Mobile views equivalent to all the views . Everything was fine until we deploys the final production version . After deployment the application behaved normally and the smoke testing was also went fine . But things went south when the next day the client reported a major issue with the IPhone/I Pad UI, as the desktop UI is getting rendered in IPhone . Lets think how weird it can be
. The team started the analysis and we absolutely don’t have any clue what could have happened . We analyzed the code deeply and can not find anything funky in it . That said we were absolutely stuck at that point .
I had a quick meeting with the team after the discussion with the client and who was already upset on the issue . We decided to lets give our final hope to Google and start digging in Google . Finally we found that there reported a known issue with MVC 4 regarding to Display mode provider
.
So finally we got some hope and we followed the steps mentioned in the blog post mentioned in Microsoft web site .
http://blogs.msdn.com/b/rickandy/archive/2012/09/17/asp-net-mvc-4-mobile-caching-bug-fixed.aspx
There is a patch from Microsoft as Nuget Package which resolves this issue . To install the Nuget package please follow the steps below

Now how do we test this . Also please note that this issue can’t appear in debug mode . For testing we have a sample windows application , where it launches with two browser windows embedded . We have created two instances of our application one with the patch and the other one without it , published in release modes and hosted in IIS . The embedded browser in the windows app first refresh after 20 minutes and after that every one minute . This way we were able to prove the fix was working
.
Please feel free to post your comments and questions .
If you need any help on the above blog , please email me to sreerajr@orioninc.com
http://d4dotnet.blogspot.in/