Finally!!!! The Browser File Definition for ASP.NET AJAX to enable IE Mobile Recognition

You Can Take it With You

Syndication

News

  • Don't miss the next Windows Mobile Webcast... Unit Testing for Mobile Devices: http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032382824&EventCategory=4&culture=en-US&CountryCode=US.

In a number of previous posts, I've talked about the difficulty of getting ASP.NET AJAX to recognize IE Mobile. I've posted a couple of workarounds but they were less than ideal because they basically subverted the natural ASP.NET behavior of relying on HttpBrowserCapabilities (Request.Browser, etc.) to identify and report the client capabilities. The challenge is that HttpBrowserCapabilities relies on having the appropriate browser features defined in a *.browser file and no such file exists for IE Mobile 6.12.

Finally!! That is no longer the case - I now have a proper IE Mobile 6.12 *.browser file definition.

I spent some time this morning digging around in the list of browser capability values (there are roughly 125) then through a bunch of trial-and-error was able to work out a *.browser file that appropriately identifies the IE Mobile 6.12 capabilities required by ASP.NET AJAX.

When using this browser file and pretty much anytime you use ASP.NET AJAX with IE Mobile, keep a few things in mind...

  • IE Mobile 6.12 as a client to ASP.NET AJAX is not an officially supported environment. In my investigations, basic features work but you need verify how well things work for your particular application.
  • I have not exhaustively worked through every one of the IE Mobile 6.12 capabilities. I focused on those capabilities that correspond to the feature information provided by the IE Mobile 6.12 Browser Standards list and those features that, through testing, appear to be needed for ASP.NET AJAX.
  • I've done basic testing of ASP.NET AJAX's behavior with IE Mobile 6.12 and these browser settings but I have not performed exhaustive testing. You need to test and verify the behavior relative to your specific application.
  • At this point I have only tested the browser settings with Visual Studio 2005 ASP.NET AJAX. My Visual Studio 2008 test machine is a mishmash of assemblies and versions right now and can't really be trusted. I'll post my findings for the Visual Studio 2008 environment as soon as I get my environment cleaned up.

Update: An expanded version of the IE Mobile browser definition file is now available here

Ok, now that I've voiced my disclaimers J ... here's the IE Mobile browser definition information.


<browsers>
    <browser id="IEMobile" parentID="WinCE">
        <identification>
            <userAgent match="IEMobile (?'version'\d+\.\d+)" />
        identification>
        <capabilities>
            <capability name="browser"             value="IEMobile" />
            <capability name="ecmascriptversion"   value="1.2" />
            <capability name="jscriptversion"      value="5.6" />
            <capability name="isColor"             value="true" />
            <capability name="msdomversion"        value="3.0" />
            <capability name="supportsCallback"    value="true" />
            <capability name="supportsXmlHttp"     value="true" />
            <capability name="tagwriter"           value="System.Web.UI.HtmlTextWriter" />
            <capability name="version"             value="${version}" />
            <capability name="w3cdomversion"       value="1.0" />
            <capability name="win32"               value="true" />
            <capability name="xml"                 value="true" />
        capabilities>
    browser>
   
    <browser id="IEMobileNotAtlasCapable" parentID="IEMobile">
        <identification>
            <capability name="version" match="6\.8" />
        identification>
        <capabilities>
            <capability name="supportsCallback"    value="false" />
            <capability name="w3cdomversion"       value="0.0" />
        capabilities>
    browser>
browsers>

To add the the browser definition information to your project, do the following

  1. On the Visual Studio menu, select Website then select Add New Item...
  2. Select the Browser File template
  3. Name the file appropriately, I use IEMobile.browser
  4. Click OK
  5. A prompt is displayed asking if the browser file "... should be placed inside the 'App_Browsers' folder", click Yes
  6. Delete the contents of the new browser file and replace with the IE browser definition information above.

Alrighty, that should do it. If you come across any problems with the browser definition or you identify ways to improve it, please let me know and I'll update the browser definitions appropriately.

Note: Just to clarify, IE Mobile 6.12 is the version of IE Mobile on Windows Mobile 6 devices


Posted Oct 22 2007, 01:31 PM by jim-wilson

Comments

mobile 6 browser wrote mobile 6 browser
on 07-12-2008 3:23 AM

Pingback from  mobile 6 browser

Add a Comment

(required)  
(optional)
(required)  
Remember Me?