Tag Archives: IE

ASP.NET 4.0 forms authentication issues with IE11

As I mentioned earlier, solutions that rely on User-Agent sniffing may break, when a new browser or a new version of an existing browser is released. Unfortunately because ASP.NET also contains browser-specific code, the new Internet Explorer 11 may cause some problems there as well.

Lucky coincidence, that one day after my previous post Eric Lawrence published an article about IE11 and User-Agent sniffing. Some interesting facts from his article:

  • The IE team deliberately designed the UA string to cause most sniffing logic to interpret it either Gecko or WebKit and not as previous IE version.
  • During the summer the ASP.NET team published a set of patches to fix the IE11 issues in earlier .NET versions. For example KB2836939 is for .NET 4.0, and you can find more links in Eric’s article.

The issue we experienced was on an older server that was running ASP.NET 4.0. IE11 sent the forms authentication cookie to the server, but the server completely ignored it. In the web.config file the forms element didn’t contain the cookieless attribute, because the default UseDeviceProfile worked perfectly before, however now we had to set it to UseCookies to make the authentication work with IE11 as well.

The patch mentioned earlier was not installed on this server, and we have not seen similar issues on .NET 4.5.

By the way setting cookieless="UseCookies" explicitly is a good security practice.


Technorati-címkék: ,,,

IE11 User-Agent string

Windows 8.1 comes with the new Internet Explorer 11 which sends the following User-Agent string in the HTTP requests to the webservers:

Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko

To see what’s the point here, compare this with the old versions’ UA strings:

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

The format completely changed, what’s more the MSIE token is completely removed! This change may cause issues, if your code contains browser-specific parts, because your old code probably won’t recognize the new browser.

Even the ASP.NET platform contains codes which respect the client’s browser, and unfortunately there were some issues in the past when some features didn’t work well with the new browsers.

Thankfully the browser detection feature of ASP.NET is completely customizable with .browser files, and if you check the C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Browsers\ie.browser file on Windows 8.1, you will see that it already contains a section for IE11:

<browser id="InternetExplorer" parentID="Mozilla">
     <userAgent match="Trident/(?'layoutVersion'[7-9]|0*[1-9]\d+)(\.\d+)?;(.*;)?\s*rv:(?'version'(?'major'\d+)(\.(?'minor'\d+)))" />
     <userAgent nonMatch="IEMobile" />
     <userAgent nonMatch="MSIE " />
     <capability name="browser"              value="InternetExplorer" />
     <capability name="version"              value="${version}" />
     <capability name="majorversion"         value="${major}" />
     <capability name="minorversion"         value="${minor}" />
     <capability name="layoutEngine"         value="Trident" />
     <capability name="layoutEngineVersion"  value="${layoutVersion}" />
     <capability name="type"                 value="InternetExplorer${major}" />

My personal experience is that old web applications must be thoroughly tested with the new IE11, even if you didn’t write any browser-dependent code, because the platform you rely on may also contain such logic. You must be especially careful if you run ASP.NET 4.0 on the server (probably because you cannot do the in-place upgrade to 4.5).

In a next post I will write about some issues we saw while we tested our ASP.NET apps with IE11.


Technorati-címkék: ,,

Test your website with multiple Internet Explorer versions

Testing a website with multiple Internet Explorer versions can be frustrating. Because IE is bound to the underlying OS you cannot install multiple IE versions side by side (which can be done with some other browsers), so you need other solutions.

IETester is a free tool which can simulate different IE versions in a single application. Although it supports Windows 8 and IE10 in desktop mode, it couldn’t reach the 1.0 version in years, and has some serious limitations.

The Expression SuperPreview was a good start from Microsoft to provide browser version comparison in a single app, but unfortunately the company stopped its development.

The Internet Explorer Developer Toolbar changes significantly. In IE11, which you can get with Windows 8.1, you find brand new F12 DevTools with new design and enhanced functionality, but unfortunately some features are missing from the compatibility tools. In previous versions – up to IE10 – there is a nice feature in the Dev Toolbar which you can use to change the Browser Mode:

IE10 Developer Toolbar: Browser Mode emulation

This looks nice and fine however there are some practical problems with it. First you can see a Document Mode selector next to it with similar options:

IE10 Developer Toolbar: Document Mode emulation

The difference between the two options is very important however it is not easy to find out what it is. If you don’t know, I strongly recommend reading the Testing Sites with Browser Mode vs. Doc Mode article from the IEBlog.

Another problem with the Browser Mode switch is that it not absolutely perfect. Although you can find most compatibility issues with it, I have seen several bugs and issues that were not spotted by using this switch but revealed only when the page was tested with IE8. To cut the long story short, the Browser Mode switch is not reliable.

Because of all these issues, the IE team decided to remove the Browser Mode switch from the new DevTools.  This is how the Emulation tab looks in IE11:

IE11 Developer Toolbar Emulation tab

As you can see there are some nice new features: you can switch between a Desktop and Windows Phone profile, you can preset not only the resolution but also the orientation, and you can emulate a GPS position as well. Regarding to the browser versions, there is a User Agent string liar option, and there is also a Document Mode switch (which can be Edge or Default), but you cannot switch to a previous browser version.

So what is the solution?

By clicking on the information icon, you can navigate to the Test Across Browsers page of the modern.IE website where you can find two solutions:

1. Microsoft partnered with the people at BrowserStack and offers 3 months free access to BrowserStack services. This offer is valid before January 10, 2014.

2. You can download a set of virtual machines. Just select your host operating system and virtualization platform and you can instantly download free Windows virtual machines preconfigured with the specified IE version:


According to the current Microsoft view – which matches the state-of-art – using virtual machines (on your machine or in the cloud) is the most reliable solution to test your web application in previous IE versions. And now you have instant access to these VMs.

Regarding to the next versions of IE, the recommendation is to follow the web standards. A good start can be Rey Bango and Dave Methvin’s 20 tips for building modern websites while supporting old versions of IE article.


Technorati-címkék: ,,

Internet Explorer 11 Developer Tools

The new, 8.1 version of Windows comes with the new, 11 version of Internet Explorer, which can be a good news (I personally find it much faster) or a bad news (must be added to your test matrix). Even if you are used to the developer tools in other browsers, I recommend you to try the new Developer Tools in IE11. Not only because it looks super cool:


But of course also because its features. The icons in the navigation bar:

  • DOM Explorer
  • Console
  • Debugger
  • Network
  • UI Responsiveness
  • Profiler
  • Memory
  • Emulation

The DevTools are rewritten from scratch, and it comes with new features on the existing tabs and with new tabs as well. I think the direction is obvious.

I will get back to this topic later.


Technorati-címkék: ,

Access Denied error when adding a link to favorites after upgrading to IE10

Today Microsoft made Internet Explorer 10 for Windows 7 globally available, so I downloaded and installed it without hesitation and upgraded the browser on my machine within a few minutes. Although the upgrade was really quick and smooth, after the restart I realized that I couldn’t add a new link to the favorites, because it failed with an Access Denied error.

I launched Sysinternals Process Monitor which gave me a hint to check the NTFS owner of my Favorites folder. I did reset the owner to myself and voila, the error was gone immediately.


Opening a URL with WebDAV

If you are a SharePoint developer, you may find the following two snippets especially useful: by clicking on them the user can open a URL in “web folder view”, so via WebDAV, of course only in IE.

<span style="behavior:url('#default#httpFolder');" 
      onclick="this.navigateFrame('https://intranet', '_blank')">

<a href="#" target="_blank"

Detailed description: About Web Folder Behaviors


Technorati-címkék: ,

jQuery breaks with old IE versions

jquery-logoThe latest, 1.9 version of jQuery was released today, together with the beta of the 2.0 version. Although both versions share the same API (some features were removed from 2.0 as well as from 1.9), there are huge differences between them:

  • The 1.9 version – just like the previous versions – runs on Internet Explorer 6, 7 and 8, or as they say, on “oldIE”.
  • The 2.0 version will not run on oldIE. This decision results a simpler, faster and smaller library.

According to the Release Notes, both versions will be supported in the future, but I’m afraid that support will not last for ever. Sooner or later the 1.9 version will be deprecated, and new features will be implemented only in the 2.0 version.

Who loses more on this, IE or jQuery? Developers will switch to other libraries, or websites will render IE 6-7-8 obsolete?


Technorati-címkék: ,,