When you create a site on .Net FrameWork 4.0 (VS 2015), when you locally check the website (on IIS-express), the TabContainer control is displayed normally. But after uploading the created site to the server (on the IIS 7 server), the control appearance is distorted, the control functionality (tab switching) will remain. IE 11 Browser. TabContainer text is offset from buttons

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

AJAX Control Toolkit very actively checks the features supported by the browser, through HttpBrowserCapabilities , and, depending on the support of features, renders different HTML / JS.

HttpBrowserCapabilities are filled in based on the browser's UserAgent. And in IE 11, it has changed dramatically. Here is how it looked in IE9, IE10 and IE11:

 Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US) Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0) Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko 

Because of such a trick, ASP.NET version <= 4.0 considers IE11 to be some kind of ancient Mossilla, without JS, without anything - and the AJAX Control Toolkit renders wild trash HTML for it.

You will either have to upgrade to .NET 4.5, or put on the server patches for .NET 4.0 that add IE11 recognition - they should have reached the server via Windows Update, but it seems that it is disabled on your server.

Locally, you most likely work because of the installed .NET 4.5, or because of the installed updates in time.


UP (from comments)

In addition, in the case of Intranet (non-Internet) applications, IE runs by default in maximum compatibility mode, most likely in IE7 mode.

This can be pierced by explicitly specifying the X-UA-Compatible header.

 <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <clear /> <add name="X-UA-Compatible" value="IE=8, IE=9, IE=10, IE=11" /> </customHeaders> </httpProtocol> </system.webServer> </configuration> 

Instructions IE=Edge may not be enough.

  • Thank you for the answer. We updated it on the .NET server to 4.5.2, but this did not solve the problem. When UserAgent now issues: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3) But there was a temporary solution to define the document mode as IE10 as here - lord-lelik
  • @lord-lelik is an intranet application? If yes, then no luck, IE by default on an intranet (local network) works in compatibility mode. You can disable either on the side of IE (Tools / Compatibility Options) or override on the page - but then it is better to set the "X-UA-Compatible" value="IE=11" or "IE=11,IE=10,IE=9" - it will make IE11 work like IE11, not like IE7). I will add in response. - PashaPash