Skip to content

Solving the Sys not defined issue on IIS7

This week I had to install a couple of web applications that used Microsoft Ajax on ISS7 for the Innovation Day event. Unfortunately there were some backwards compatibility issues that made me use the backwards compatible Asp.Net application pool and not the new default app pool.

Although the web apps loaded ok I kept getting a Sys not defined javascript error and as you can probably guess (Sys is the root namespace for Ajax javascript libraries) there was no Ajax behavior on these apps. After investigating for a while it turned out that if you’re planning to use IIS7 to host Ajax enabled web sites using the Backwards compatible app pool you must delete the

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </modules>
    <handlers>
        <remove name="WebServiceHandlerFactory-ISAPI-2.0"/>
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="ScriptResource" verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </handlers>
</system.webServer>

section from your app’s web.config file because it disables the download of the Ajax javascript files.

Published inASP.NETWeb

6 Comments

  1. I haven”t <system.webServer> section in my webconfig ,but I have the same problem.So I can”t fix the error.

  2. Markus Markus

    Hi,
    i delete the section but i still have the problem.
    Greetings
    Mull

  3. Min Min

    I do not have this section, but I still get this error.

  4. This hapened a long time ago and haven”t seen it using the latest version of IIS and ajax.
    I”ll try to setup a demo machine (when I get more time) and see if this still applies.

Leave a Reply

Your email address will not be published.