1

I recently inherited an ASP.NET website that works in every browser we've tested except IE 10/11 (works fine in 9 and previous). When refreshing the page with the console open, it appears that Sys.WebForms is undefined in IE and not in other browsers. Running in compatibility mode does not solve this.

Here's the layout of the site.

Master file

<head>
    <script type="text/javascript" src="<%# Page.ResolveClientUrl("~/Scripts/Scripts.js") %>"></script>
</head>
...
<body>
    ...
    <form id="Tabs_Form" runat="server">
        <asp:ScriptManager ID="Scriptmanager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true" ScriptMode="Release"></asp:ScriptManager>
        <script type="text/javascript">
            function SetUpPageHandlers() {
                PageRequest = Sys.WebForms.PageRequestManager.getInstance();
                PageRequest.add_initializeRequest(InitializeRequestHandler);
                PageRequest.add_beginRequest(BeginRequestHandler);
                PageRequest.add_endRequest(EndRequestHandler);
                PageRequest.add_pageLoaded(PageLoadHandler);
            }
        ...

Scripts.js

$(document).ready(function () {
    ...
    SetUpPageHandlers();
});

When examining the Sys variable in the console in IE 11, it only has the following members.

__namespace
__rootNamespaces
__typeName
__upperCaseTypes
_jsonp
Application
Browser
Debug
Net
Res
Serialization
UI

In other browsers, it includes way more members. Does anyone have any ideas what's causing this to act up in IE 10/11?

  • Compatbility mode often makes no difference. It's usually the document mode you need to worry about. You can coerce the browser to use the correct document through the `x-ua-compatible` meta tag, as described [here](http://stackoverflow.com/questions/14940621/force-document-mode-ie8-standards). – mason Feb 23 '15 at 20:24
  • Unfortunately that didn't work. I have no idea what's causing this problem. –  Feb 24 '15 at 18:47

1 Answers1

1

You may be running an version of ASP.NET that does not have the latest browser definition files.

Download this zip file and extract the .browser file. Then place the browser file in an app_browsers folder in your application's root directory. Restart your app pool.

If the above fix works, consider installing the latest browser definition files on the server, or better yet, consider installing ASP.NET 4.5+.

This blog post does a great job of explaining the issue.

James Lawruk
  • 30,112
  • 19
  • 130
  • 137