ASP.NET AJAX client-side framework not loaded

Discussion in 'ASP .Net' started by rKrishna2k6@gmail.com, Dec 2, 2008.

  1. Guest

    I have basic default.aspx page as follows below, has ScriptManager tag
    in it. And its associated cs code file nothing in it.
    It runs without errors on the Developer's machine where VS2008
    installed.

    On our Windows 2003 Server, .NET Framework version 3.5 is enough to
    run AJAX ( to use ScriptManager??)
    Is anything else is required?
    because we were running into the following error(s)

    'Sys' is undefined (ASP.NET AJAX client-side framework not loaded).
    On the Server IIS logs show that both WebResource.axd and
    ScriptResource.axd came back with http-404.



    <%@ Page Language="C#" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="testApp1._Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
    www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <p>test page</p>
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    </form>
    </body>
    </html>
     
    , Dec 2, 2008
    #1
    1. Advertising

  2. Hans Kesting Guest

    formulated on dinsdag :
    > I have basic default.aspx page as follows below, has ScriptManager tag
    > in it. And its associated cs code file nothing in it.
    > It runs without errors on the Developer's machine where VS2008
    > installed.
    >
    > On our Windows 2003 Server, .NET Framework version 3.5 is enough to
    > run AJAX ( to use ScriptManager??)
    > Is anything else is required?
    > because we were running into the following error(s)
    >
    > 'Sys' is undefined (ASP.NET AJAX client-side framework not loaded).
    > On the Server IIS logs show that both WebResource.axd and
    > ScriptResource.axd came back with http-404.
    >
    >
    >
    > <%@ Page Language="C#" AutoEventWireup="true"
    > CodeBehind="Default.aspx.cs" Inherits="testApp1._Default" %>
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
    > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    >
    > <html xmlns="http://www.w3.org/1999/xhtml" >
    > <head runat="server">
    > <title>Untitled Page</title>
    > </head>
    > <body>
    > <form id="form1" runat="server">
    > <div>
    > <p>test page</p>
    > </div>
    > <asp:ScriptManager ID="ScriptManager1" runat="server">
    > </asp:ScriptManager>
    > </form>
    > </body>
    > </html>


    I think you need some lines in the web.config, to get the
    WebResource.axd recognized:

    at least these lines in a <httpHandlers> section

    <add path="*.asmx" verb="*"
    type="System.Web.Script.Services.ScriptHandlerFactory,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" validate="false"/>
    <add path="*_AppService.axd" verb="*"
    type="System.Web.Script.Services.ScriptHandlerFactory,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" validate="false"/>
    <add path="ScriptResource.axd" verb="GET,HEAD"
    type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
    Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
    validate="false"/>


    Hans Kesting
     
    Hans Kesting, Dec 2, 2008
    #2
    1. Advertising

  3. Guest

    I have it in the project web.config.

    Here is my web.config as follows..





    <?xml version="1.0"?>
    <configuration>
    <configSections>
    <sectionGroup name="system.web.extensions"
    type="System.Web.Configuration.SystemWebExtensionsSectionGroup,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35">
    <sectionGroup name="scripting"
    type="System.Web.Configuration.ScriptingSectionGroup,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35">
    <section name="scriptResourceHandler"
    type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" requirePermission="false"
    allowDefinition="MachineToApplication"/>
    <sectionGroup name="webServices"
    type="System.Web.Configuration.ScriptingWebServicesSectionGroup,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35">
    <section name="jsonSerialization"
    type="System.Web.Configuration.ScriptingJsonSerializationSection,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" requirePermission="false"
    allowDefinition="Everywhere"/>
    <section name="profileService"
    type="System.Web.Configuration.ScriptingProfileServiceSection,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" requirePermission="false"
    allowDefinition="MachineToApplication"/>
    <section name="authenticationService"
    type="System.Web.Configuration.ScriptingAuthenticationServiceSection,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" requirePermission="false"
    allowDefinition="MachineToApplication"/>
    <section name="roleService"
    type="System.Web.Configuration.ScriptingRoleServiceSection,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" requirePermission="false"
    allowDefinition="MachineToApplication"/>
    </sectionGroup>
    </sectionGroup>
    </sectionGroup>
    </configSections>
    <appSettings/>
    <connectionStrings/>
    <system.web>

    <compilation debug="true">
    <assemblies>
    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0,
    Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.Extensions, Version=3.5.0.0,
    Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=B77A5C561934E089"/>
    </assemblies>
    </compilation>

    <authentication mode="Windows"/>

    <customErrors mode="Off"/>
    <pages>
    <controls>
    <add tagPrefix="asp" namespace="System.Web.UI"
    assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    <add tagPrefix="asp" namespace="System.Web.UI.WebControls"
    assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    </controls>
    </pages>
    <httpHandlers>
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false"
    type="System.Web.Script.Services.ScriptHandlerFactory,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    <add verb="*" path="*_AppService.axd" validate="false"
    type="System.Web.Script.Services.ScriptHandlerFactory,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    <add verb="GET,HEAD" path="ScriptResource.axd"
    type="System.Web.Handlers.ScriptResourceHandler,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" validate="false"/>
    </httpHandlers>
    <httpModules>
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    </httpModules>
    </system.web>
    <system.codedom>
    <compilers>
    <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
    type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <providerOption name="CompilerVersion" value="v3.5"/>
    <providerOption name="WarnAsError" value="false"/>
    </compiler>
    </compilers>
    </system.codedom>

    <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
    <remove name="ScriptModule"/>
    <add name="ScriptModule" preCondition="managedHandler"
    type="System.Web.Handlers.ScriptModule, System.Web.Extensions,
    Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </modules>
    <handlers>
    <remove name="WebServiceHandlerFactory-Integrated"/>
    <remove name="ScriptHandlerFactory"/>
    <remove name="ScriptHandlerFactoryAppServices"/>
    <remove name="ScriptResource"/>
    <add name="ScriptHandlerFactory" verb="*" path="*.asmx"
    preCondition="integratedMode"
    type="System.Web.Script.Services.ScriptHandlerFactory,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    <add name="ScriptHandlerFactoryAppServices" verb="*"
    path="*_AppService.axd" preCondition="integratedMode"
    type="System.Web.Script.Services.ScriptHandlerFactory,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    <add name="ScriptResource" preCondition="integratedMode"
    verb="GET,HEAD" path="ScriptResource.axd"
    type="System.Web.Handlers.ScriptResourceHandler,
    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35"/>
    </handlers>
    </system.webServer>

    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="System.Web.Extensions"
    publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/
    >

    </dependentAssembly>
    <dependentAssembly>
    <assemblyIdentity name="System.Web.Extensions.Design"
    publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/
    >

    </dependentAssembly>
    </assemblyBinding>
    </runtime>
    </configuration>
     
    , Dec 2, 2008
    #3
  4. Guest

    When I look at the Server GAC

    Two entries for both System.Web.Extensions and
    System.Web.Extensions.Design


    System.Web.Extensions 3.5.0.0 31bf3856ad364e35
    System.Web.Extensions 1.0.61025.0 31bf3856ad364e35


    System.Web.Extensions.Design 3.5.0.0
    31bf3856ad364e35
    System.Web.Extensions.Design 1.0.61025.0
    31bf3856ad364e35


    I tried to uninstall the version 1.0.61025.0, it says Assembly
    'System.Web.Extensions' could not be uninstalled because it is
    required by other applications.

    Any ideas, again thanks in advance.
     
    , Dec 2, 2008
    #4
  5. Guest

    When I look at the Server GAC

    Two entries for both System.Web.Extensions and
    System.Web.Extensions.Design

    System.Web.Extensions 3.5.0.0
    31bf3856ad364e35
    System.Web.Extensions 1.0.61025.0 31bf3856ad364e35

    System.Web.Extensions.Design 3.5.0.0
    31bf3856ad364e35
    System.Web.Extensions.Design 1.0.61025.0 31bf3856ad364e35


    I am able to uninstall btoh
    System.Web.Extensions 1.0.61025.0
    31bf3856ad364e35
    System.Web.Extensions.Design 1.0.61025.0
    31bf3856ad364e35
    by uninstalling AJAX 2 Extensions 1.0.


    I copied both
    System.Web.Extensions.dll
    System.Web.Extensions.Design.dll
    From C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 to
    my project bin folder.


    I restarted IIS, still having the same issue 'ASP.NET AJAX client-side
    Framework Not loaded.
     
    , Dec 2, 2008
    #5
  6. RK Guest

    Finally I FIXED this issue, and frankly its very weird and very
    simple.

    I created the following two blank files (absolutely no content) in my
    project root folder.

    1. WebResource.axd
    2. ScriptResource.axd

    That worked on our Server, what a relief.
     
    RK, Dec 2, 2008
    #6
  7. Joe Fawcett Guest

    Perhaps IIS is set to check for existence of files?

    --

    Joe Fawcett (MVP - XML)

    http://joe.fawcett.name

    "RK" <> wrote in message
    news:...
    > Finally I FIXED this issue, and frankly its very weird and very
    > simple.
    >
    > I created the following two blank files (absolutely no content) in my
    > project root folder.
    >
    > 1. WebResource.axd
    > 2. ScriptResource.axd
    >
    > That worked on our Server, what a relief.
    >
    >
     
    Joe Fawcett, Dec 4, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?b25l?=
    Replies:
    1
    Views:
    5,313
    Karl Seguin [MVP]
    Mar 8, 2006
  2. Boss302
    Replies:
    0
    Views:
    1,070
    Boss302
    Nov 21, 2006
  3. Rachel
    Replies:
    1
    Views:
    931
    Rachel
    Dec 10, 2007
  4. JJ
    Replies:
    10
    Views:
    4,613
    sakram
    Jun 22, 2011
  5. thisis
    Replies:
    5
    Views:
    268
    thisis
    Oct 29, 2006
Loading...

Share This Page