Microsoft

Blog Categories

Subscribe to RSS feed

Archives

Three Options to Disable the SharePoint 2010 Mobile Redirect Sys

There are a few options for disabling the SharePoint Mobile Redirection System. Disabling the system means that browsers will not be redirected to a mobile version of the site created by SharePoint by default. This is not about how to customize the mobile view that only mobile devices would see.

  • Modify the webconfig file
    • Add three lines of code that set all browsers to not be redirected
    • This option is deployable through a WSP
    • Does not allow for browsers to be handled individually
    • File is on the server in C:InetpubwwwrootwssVirtualDirectoriesPORTbin folder of your SharePoint site, where PORT is the port of your site
    • add segment to the ‘configuration/system.web’ section (thanks Peter)
    • Code to add:
      • <browserCaps>
        <result type=”System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”/>
        <filter>isMobileDevice=false</filter>
        </browserCaps>
  • The compat.browser – This file lists all of the browser User Agent strings that it will redirect
    • Changing a value from true to false for all of them will cause it to NOT redirect those browsers
    • This option is deployable through a WSP
    • Allows for switching some browsers back if needed
    • Allows more browsers to be added in the future
    • Might get re-written during a service pack upgrade
    • File is on the server in C:\Inetpub\wwwroot\wss\VirtualDirectories\[port-of-your-site]\bin – OR – C:\inetpub\wwwroot\wss\VirtualDirectories\[port-of-your-site]\App_Browsers
    • Code to change (for each UA):
      • <capability name=”isMobileDevice” value=”false” />
  • If MobilityRedirect SP Feature is on – disable with a Power Shell command
    • Is Off by default (thanks Peter)
    • Not Deployable through a WSP
    • Doesn’t handle browsers individually
    • Has not been verified as an option
    • Code to use:
      • Disable-SPFeature -Identity MobilityRedirect -Url http://yoursite

Tags: ,

8 thoughts on “Three Options to Disable the SharePoint 2010 Mobile Redirect Sys

  1. Pingback: Disable mobile browsing for a single website in SharePoint 2010 | Question and Answer

  2. lucas

    I found the correct folder and file located at. c:\inetpub\wwwroot\wss\virtualdirectories\MyWebUrl\App_Browsers\compat.browser.

  3. Kartik Anand

    How would you produce similar results for SP Online [office365]? The goal is to disable mobile redirect in SPOnline where you have very limited control.

  4. lucas

    None of these solutions work.
    Option 1 = Internal Server Error 500
    Option 2 = compat.browser does not exsist in this location
    Option 3 = if it is already off by default then turning it off again doesn’t do any thing.

  5. C:\Marius

    I’ve actually also used another approach which would allow every Power-User to benefit from it:
    1. In the Default.aspx (Team-Site) of the Top-Level site replace all content with – which actually is a simple Wiki Library where anyone would simply create the minimal HTML.

    Then every single Link is automatically processed via the /_layouts/mobile/mblwiki.aspx?Url=SITECOLLECTIONURLOFTHEPAGE
    I agree, not according to guidellines, standards, but the simplest for every End-User!
    “Simples”

Leave a Reply