When upgrading to R2 AdapterMappings.browser is overwritten


A test that validated that a user that visited the site with a mobile user agent still get a mime type of “text/html” instead of some wap thing failed. To get the behaviour we’re using the following capabilities node in the AdapterMappings.browser (in the AppBrowser folder)

      <!-- Force all browsers to use text/html (if this is missing, mobile devices will get text/vnd.wap.wml and url rewriting will be bypassed)
           see http://stackoverflow.com/questions/1261144/make-iis-not-render-pages-as-wml-ever 
      <capability name="preferredRenderingMime" value="text/html" />

The upgrade

So when the site is upgrade the AdapterMappings.browser file is overwritten and replaced with a default EPiServer file. To verify that this wasn’t something specific to the site I was upgrading I created a new R1 site, changed the AdapterMappings.browser file and then performed a upgrade to R2. The file was indeed replaced here too.