How to disable mobile view in Sharepoint

Today I’ve received a particular incidence of ene of my costumers, they want to disable the mobile view for Android devices because it throws an error when users access to the portal. They’re leaving responsive design to the dark side 😦

We have different options to do that, so in this post I’ll explain how to do it:

    • Modifications to the web.config filePros
      • Single modification for all devices
      • Can be part of a SharePoint solution (using code)
      • Not overwritten during Service Pack / Cumulative update

      Cons

      • No individual handling

      Go and edit the web.config file of the site (e.g C:InetpubwwwrootwssVirtualDirectories<webapp>)

      Add the following code to the configuration/system.web node

 

&lt;browserCaps&gt;
  &lt;result type=&quot;System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot;/&gt;
  &lt;filter&gt;isMobileDevice=false&lt;/filter&gt;
&lt;/browserCaps&gt;

  •  Modify the compat.browserPros
    • Individual handling of mobile devices / browsers
    • Can be part of a SharePoint Solution (using code)

    Cons

    • Overwritten during service pack

    Go and edit the compat.browser file of the site (e.g C:InetpubwwwrootwssVirtualDirectories<webapp>App_Browsers)

Look for iPhone Safari Browser comment or any other mobile devices you see fit and change the value from true to false. Especially for iPhone Safari Browser, iPod Safari Browser and Android Safari Browser

Turn-Off-Mobile-SharePoint

  • Modify isMobileDevice to false.

No IISReset is required, but some times help 😉

Other resolutions can be found here: http://blogs.technet.com/b/yashgoel-msft/archive/2015/01/15/blocking-access-to-mobile-view-in-sharepoint.aspx

that’s all!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s