Mobile Development with SharePoint Foundation
Published: May 2010
This section provides information about the extensibility options available as you work with the pages, controls, and Web Part adapters that are used to access Microsoft SharePoint Foundation Web sites through mobile devices. It also provides information about how to incorporate mobile messaging into your SharePoint Foundation solutions.
To disable automatic mobile sensing and redirection
The following should be at the forefront. Mobile development on SharePoint is way too complicated for most technical people but, that's not the most important and invading issue at the forefront facing Web Developers. It is simply that mobile development on SharePoint implies a double development effort for web developers, and that simply is not cool. In addition, browsers that come on Smart Phones these days are advanced enough to be able to display the first rendered customized SharePoint home page which is scrollable. Unlike the default SharePoint home page OOTB which doesn't scroll.
That said, to turn off automatic mobile sensing and redirection, simply edit your web.config file and add this to the <System.Web> section. Placement within this section doesn't matter. Edits to web.config are implemented immediately after a save. So, there's no need to restart IIS or, your web application.
<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 other alternative is to edit the compat.browser in the file system within your web application's App_Browsers folder, i.e \wwwroot\wss\VirtualDirectories\{yourwebapp}\App_Browsers\, and change all true references to false, i.e...
<capability name="isMobileDevice" value="true" />
But, that didn't work for my particular installation of SharePoint Foundation 2010. After restarting the web app, an error with section names that were formerly OK, now weren't okay. Weird stuff. System Admins and Web Developers out in the Corporate jungle don't have time for weird stuff. Just stuff that works.
That said, to turn off automatic mobile sensing and redirection, simply edit your web.config file and add this to the <System.Web> section. Placement within this section doesn't matter. Edits to web.config are implemented immediately after a save. So, there's no need to restart IIS or, your web application.
<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 other alternative is to edit the compat.browser in the file system within your web application's App_Browsers folder, i.e \wwwroot\wss\VirtualDirectories\{yourwebapp}\App_Browsers\, and change all true references to false, i.e...
<capability name="isMobileDevice" value="true" />
But, that didn't work for my particular installation of SharePoint Foundation 2010. After restarting the web app, an error with section names that were formerly OK, now weren't okay. Weird stuff. System Admins and Web Developers out in the Corporate jungle don't have time for weird stuff. Just stuff that works.
- 9/25/2011
- Joe-MyVwsNet