احصائيات المدونة

Wednesday, June 6, 2012

Disable mobile browsers in SharePoint


  • We too encountered this problem. After a few hours of research and diving into the SharePoint assemblies with reflector I have found a way to get it to work. As in, to display the normal website on all mobile devices. This was our goal, so I didn't research options to get the mobile view to work on a public facing site.
    For this, add within the web.config file of the WebApp in the section configuration/system.web:

     <browserCaps>
      <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
      <filter>isMobileDevice=false</filter>
    </browserCaps>

    This method is officially deprecated since the .NET Framework 3.0, but works like a charm. Needless to say that one could easily wrap this in a feature event receiver to adjust the web.config files upon deployment.