Tag Archives: Mobile

SharePoint 2010 | Disable Mobile Detection on a SharePoint Website

Just a quick brain dump today on the SharePoint mobile experience for those of us who still have to deal with 2010 (Yes, 2013 is so much better for this stuff) since this just came up and I realized I had not yet posted it.  The question of reactive vs. adaptive design for a website I’ll leave for another day and the various frameworks you can use with SharePoint like bootstrap to give a single page the full mobile/desktop experience.

In any case, the mobility feature can be turned on or off per my post a couple years back: SharePoint 2010–Mobility Redirect Feature and this is nice, but the feature also has it’s own quirks with dealing with a publishing site, and in some cases even if you turn it off the site still detects mobile browsers and tries to redirect.  So, there are two quick ways to disable SharePoint from detecting a mobile browser if you just don’t want to deal with it.

1.  This is probably the most tried and true method, just update the compat.browser file found in the site’s App_Browser directory and change the capability of isMobileDevice to “false” for all items that have it set to true.

<capability name="isMobileDevice" value="false" />

That works well, seems like most people use it and move on.  Advantages are that you can single out specific browsers and target the user experience, or flip back and forth with certain specific browsers.  Bad news is that it can be overwritten when service packs get involved.  Microsoft also recommends an iisreset /noforce after you change the file

2. This is a little nicer in the sense that it’s a change to the web.config so we can set up a WSP to do this for us (and it won’t get overwritten) and as it’s only a couple of lines in the web.config we can switch back and forth fairly easily in our test and QA environments.  Bad news is of course that it uses the browserCaps element in the web.config.  Deprecated in favor of the compat.browser file mentioned above, but interestingly still supported all the way up to the .NET 4.0 framework at this time.  So, if you want to turn off mobile detection for a site, just drop this in the web.config file of the web application in the <system.web> node.  Obviously, as this is a change to the web.config file, every time you change the file the web application will restart.

    <result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

SharePoint 2013–Mobile Devices

So just a few quick thoughts about mobile devices and SharePoint 2013 preview

Different mobile experiences!  Nice that they give more preference to the mobile experience.  We’ve gone from the default mobile view of one size fits all to device channels, allowing designers to render a publishing site in multiple ways by using different designs that are targeted to specific platforms.  This allows us to author content once, and then map it to different devices through the use of different master pages, page layouts and style sheets targeted to different groups of devices.  Imagine that we now get a different UX when accessing the system from a iPad or Galaxy tablet, another UX when using iPhone or Android phones, and yet another when using desktop.  Interesting side note: The preview version also has something called “Focus on content”, when toggled on it strips away the chrome of the left and top navigation and shows just the content.  Not sure how useful that will be in the long run, but it does expose a bit behind Microsoft’s thinking that it’s all about content.

Support for HTML5!  The new contemporary view will render in HTML5, allowing us access to all those goodies that come with it.  Assuming of course that the system is being accessed with IE9 (which comes with its own set of issues) Windows Phone 7.5, iPhone 4.0 and Android 4.0.  Nice to move away from compatibility and take advantage of modern browsers.

Authentication in SharePoint and the OData model!  For those of you familiar with Facebook, OAuth and OData are the way to go, and the preview comes with a new authenticator class that works with Windows Phone 7 users and support for ECMAScript that works with the Representational State Transfer (REST) services for those of us who don’t have WP7.

Location-aware apps!  There is a new native field type class SPFieldGeoLocation for integration location and map functionality.  Examples would be for companies with branches or stores to allow customers to quickly find the location that is closest to them on their mobile phone, no need to type in an address or ZIP.

And of course, for those of us who treat SharePoint like an application platform and are looking to build out a pure mobile site, the preview offers a Visual Studio template that will build out list applications for the Windows Phone.  Examples would be for things like to-do list, inventory, tasks that can be manipulated and updated from WP.

I like what I see so far, I can definitely see some synergies for writing content once and viewing it on multiple devices in a friendly and device oriented surface.

Windows Phone–Free Training on March 24th

Hey Devs,

This Saturday, March 24th, at the LA Microsoft Office!!!

You don’t want to miss this! Not only is this full day of training absolutely FREE, but there is $800 in prize money, and they are giving away three Nokia Lumia 800 phones! And if that wasn’t enough, you will get fed all day as well.  Breakfast, lunch and dinner!  You can’t beat that.  All the information you need can, and the registration link is below.



Agenda: Introduction to Windows Phone 7 Programming

In this session, we start with a discussion of windows phone, the architecture changes made from 6.5 to 7.0, the hardware specifications and then move into the beginnings of building a WP7 application including…

  1. Application life cycle
  2. Hardware Foundation
  3. Files associated with project template
  4. Splash screen and the importance of 1 second / 19 second loading
  5. Application Bar
  6. Panorama and Pivot controls
  7. MVVM
  8. Marketplace

Connecting to Services

In this session, we will discuss how Cloud Services help to bring power to the phone. We will be binding to a rest based services and show how to search and display the information received. In this session we will also talk about Navigation, passing information between screens, while working with List and detail information.

  1. Navigation
  2. Location
  3. JSON Deserialization
  4. Bing Maps
  5. Isolated Storage
  6. Binding Sample Data
  7. Navigation

Recording Data

In this session we will be adding to our knowledge and learn the importance of live tiles. We will show you how to set up a periodic agent and how to set up and read and write to a SQL Database on Windows Phone.

  1. Live Tiles
  2. SQL CE
  3. Background Processes and Periodic Agents
  4. Launchers and Choosers

SharePoint–Going Mobile

It’s not great, but it is functional.  You can get the mobile emulator here: http://msdn.microsoft.com/mobility/windowsmobile/downloads/emulatorpreview/default.aspx


SharePoint mobile sites can be accessed by appending an “/m” at the end of the URL.  From this mobile landing page you can access the lists, libraries and list items on the site, just don’t expect any fancy UI or branding.

More information can be found on Martin Kearn’s blog posting.