1

Closed

Mvc4RC Release mode bug for mobile views when mixing the webforms and razor view engines

description

I have a site whose desktop views are built using the webforms view engine and the newer mobile views are built using the razor view engine. The all works fine in debug but when the site is in release I see the following issue:

If the first request to a page is for the desktop (webforms) version then the webforms version will always be returned regardless of if the accessing device is mobile or not. If the first request is for the mobile view then the correct page will be served for each type of device.

I have found a workaround (override the razor view engine with a new inherited view engine that forces usecache to off for mobile devices) buy obviously a fix that allows us to leave the caching on would be much better.

Attached is a simple project that shows the issue

file attachments

Closed Jul 6, 2012 at 7:17 PM by HongmeiG
Thank you for reporting the issue. Unfortunately, having a different vew engine for the desktop and mobile views are not supported.

comments