UAG Portal on Microsoft Surface Windows 8.1 displays as mobile site

With the update for 8.1 out a few days ago we eagerly updated our surface devices to test it out.  Whilst we loved a lot of the new updates we found that the upgrade to Internet Explorer 11 made our UAG portal default to the mobile version of this site on the Surface.   After a few hours of head scratching we finally found a solution:

In the web.config file for the Internalsite (C:\Program Files\Microsoft Forefront Unified Access Gateway\von\InternalSite) you need to amend/add four lines:

In the DetectionExpressions section add a line:

<DetectionExpression Name=”IE11″ Expression=’UserAgent Contains “mozilla” AND UserAgent Contains “rv:11″‘ DefaultValue=”false” />

This sets it to recognise IE 11 – unlike other IE browsers it does not contain “IE” or “MSIE” fields which normally denote an MS browser (probably because it is a beta).

Next we need to amend the below line:

From:     <DetectionExpression Name=”Mobile” Expression=’MobileDevice OR WindowsCE’ DefaultValue=”false” />

To:          <DetectionExpression Name=”Mobile” Expression=’!IE11 AND (MobileDevice OR WindowsCE)’ DefaultValue=”false” />

So this stops it seeing it as a mobile device and redirecting it to the mobile version of the site.

Next amend the below line:

From:     <DetectionExpression Name=”IE” Expression=’Browser Contains “ie” OR Browser Contains “msie”‘ DefaultValue=”false” />

To:          <DetectionExpression Name=”IE” Expression=’Browser Contains “ie” OR Browser Contains “msie” OR IE11’ DefaultValue=”false” />

This one denotes IE11 as an IE version of the browser, as above.

Lastly amend the below line:

From:     <DetectionExpression Name=”Windows8″ Expression=’UserAgent Contains “windows nt 6.2″‘ DefaultValue=”false” />

To:          <DetectionExpression Name=”Windows8″ Expression=’UserAgent Contains “windows nt 6.2” OR UserAgent Contains “windows nt 6.3″‘ DefaultValue=”false” />

This one allows for detection of the new version of Windows 8 – Windows 8.1.

 

IMPORTANT:

  • If you have depoyed a Forefront UAG array, you must manually replicate any changes on all array members.
  • If you export the configuration, you customized files are not included in the exported configuration.
  • If you apply a service pack, update, or hotfix to Forefront UAG, your customized files might be overwritten and your customizations lost.
  • Microsoft are working on SP4 which will likely address this issue so unless you have a desperate need to have this working for your surface users you might be best advised to wait for the official update.

For more information please see the following TechNet article: http://technet.microsoft.com/en-us/library/ff607404.aspx.

Post to Twitter

3 Comments

  1. […] have noticed that UAG 2010 SP3 will detect Windows 8.1 clients as mobile devices. The not supported solution presented by Risual forgets to notify you that you need to make the change in both the InternalSite web.config as well […]

  2. William Third

    Hello

    Making this change produces a 500 error with complaints about line 32 on our UAG server, do you have insight as to why this error is cropping up?

  3. Sushil

    It does not work, lot of people tried
    can you further elaborate this? it would be great help. I tried posting comment earlier but seems ignored

Leave a Comment

Your email address will not be published. Required fields are marked *