OutSystems Platform and ASP.NET browser capabilities

Hi everyone,

Until OutSystems Platform 5.1, we were setting some browser capabilities definitions in the .NET machine.config files. This allowed to provide support for old mobile phones, but it was lacking support for some recent browsers such as Internet Explorer 10.

We found that features like client-side input validation and post-backs were having some problems, caused by having the browser capabilities definitions. These errors were mostly caused by Javascript errors at runtime.

So, if you are having problems using features such as client-side input validations, post-backs, or using JavaScript in some recent browser, it's probably related to wrong detection of browser capabilities.

What are browser capabilities?

Browser capabilities indicate whether the browser type in general supports features such as JavaScript, cookies, frames, and so on, not whether an individual instance of the browser has these features enabled or disabled.

Different browsers, and different versions of the same browser, support different features. ASP.NET server controls will automatically determine the browser that has requested the page and render the appropriate markup for that browser.

One way to create custom browser capabilities definitions is by changing the <browserCaps> element in .NET machine.config files, although it has been deprecated in the .NET Framework version 2.0.

Usually <browserCaps> settings are changed in complex scenarios where you have to support devices like old mobile phones (pre-Android or iOS).

Why we want to remove browser capabilities?

Until the OutSystems Platform version 5.1, we were setting some browser capabilities definitions that are leading to wrong detection of browser capabilities for some recent browsers like IE10.

There are two choices to overcome this problem:

  • Fix those settings to support all the existing browsers
  • Remove those settings

As the .NET Framework already supports the most used browsers (and a lot of others that you probably never heard about) we've decided to remove all the settings in the <browserCaps> element.

If you want to remove the contents of the <browserCaps> settings you can do it by running the Configuration Tool (OutSystems Platform v7.0.1.13+), clicking on Apply and Exit button and choosing Yes when the following popup shows up:

Answering Yes will create a backup of your machine.config files in the same directory of the original files and then will remove all the contents inside the <browserCaps> element.

Apply a Microsoft hotfix regarding .Net browser definition files

If you don't have the .NET Framework up-to-date in your servers, the previous procedure might not be enough to overcome this problem.

So, if after fixing your browser capabilities the problem persists, we recommend you to take a look at this blog post that details an issue when using IE10 with a Windows Server where the .NET browser definition files have not been updated to recognize this new browser version.

We have seen some servers where this hotfix was necessary to help fixing the problems that were experienced when using IE10. A lot of Windows Server installations should have this correction already applied by the automatic Windows Updates.

Nevertheless, we recommend you check if these hotfixes are applied:

What about custom browser capabilities?

If you have customized your browser capabilities settings and you can’t simply remove it, please take a look in the procedure below.

This procedure describes how to identify and fix your settings to support Internet Explorer 10. You must apply this procedure to all the front-ends in your OutSystems installation – i.e. all machines where you have the Agile Platform Server installed.

Fix a problem in the browser detection algorithm to correctly identify IE10 as a javascript-capable browser

If you installed the Agile Platform for the first time in version 6.0+, and you have not customized the <browserCaps> element in machine.config to support special browsers, you can skip this step.

Otherwise follow the steps below to validate if you are correctly identifying IE10:

1)  Find your machine.config file location

For 32bit OS: %WINDIR%\Microsoft.NET\Framework\v2.0.50727\Config
For 64bit OS: %WINDIR%\Microsoft.NET\Framework64\v2.0.50727\Config

2)  Make a backup of machine.config file and place it in a safe location (in case you need to revert the changes)

3)  Open the file in Notepad (in Windows 2008R2, open Notepad with Right-Click -> Run as administrator)

4)  Find <browserCaps> element (/configuration/system.web/browserCaps)

5)  If you are customizing this element to support special browsers, find the <case> element that matches Internet Explorer

6)  Inside this element find the <case> element that matches IE9 version

7)  Change the regular expression to match IE10 version also

8)  Save and close the file

If you have any further questions you can simply reply to this post.

With best regards,

Miguel Rebelo