AJAX Controls Not Working On Deployment Server - PLEASE HELP!!

Oct 11, 2012 at 6:02 PM
Edited Oct 11, 2012 at 10:07 PM

I can't seem to figure out why a very simple AJAX control won't work on a hosted server.  The server supports .NET4 and my other sites work.  When I use an AJAX control they don't seem to work.  I have tried a Report Viewer control and then a simple Timer control, neither work correctly.  Here is my code:

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

 

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

 

<!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></title>

</head>

<body>

    <form id="form1" runat="server">

    <asp:Label runat="server" ID="lblDoSomething"></asp:Label>

 

    <div>

        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">

        </asp:ScriptManager>

        <rsweb:ReportViewer ID="ReportViewer1" runat="server">

        <LocalReport ReportPath="Report.rdlc"></LocalReport>

        </rsweb:ReportViewer>

        <asp:Timer ID="Timer1" runat="server" OnTick="DoSomething" Interval="5000">

        </asp:Timer>

    </div>

    </form>

</body>

</html>


using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

 

public partial class _Default : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

 

    }

    protected void DoSomething(object sender, EventArgs e)

    {

 

        lblDoSomething.Text = DateTime.Now.ToString();

    }

}

Here is my web.config file, I started out with a stripped down file, but I have tried adding a whole bunch of entries found on the web:

 

<?xml version="1.0"?>

<!--

  For more information on how to configure your ASP.NET application, please visit

  http://go.microsoft.com/fwlink/?LinkId=169433

  -->

<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=1.0.61025.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=1.0.61025.0, 

              Culture=neutral, PublicKeyToken=31bf3856ad364e35" 

              requirePermission="false" allowDefinition="Everywhere" />-->

          <!--<section name="profileService" 

              type="System.Web.Configuration.ScriptingProfileServiceSection, 

              System.Web.Extensions, Version=1.0.61025.0, 

              Culture=neutral, PublicKeyToken=31bf3856ad364e35" 

              requirePermission="false" 

              allowDefinition="MachineToApplication" />-->

          <!--<section name="authenticationService" 

              type="System.Web.Configuration.ScriptingAuthenticationServiceSection, 

              System.Web.Extensions, Version=1.0.61025.0, 

              Culture=neutral, PublicKeyToken=31bf3856ad364e35" 

              requirePermission="false" 

              allowDefinition="MachineToApplication" />-->

        </sectionGroup>

      </sectionGroup>

    </sectionGroup>

  </configSections>

 

 

 

  <system.web>

 

    <pages>

      <controls>

        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

      </controls>

    </pages>

 

    <compilation debug="false" targetFramework="4.0">

      <assemblies>

        <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

        <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

 

        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

 

      </assemblies>

    </compilation>

 

    <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"/>

 

        <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

 

    </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.webServer>

      <validation validateIntegratedModeConfiguration="false" />

      <modules>

          <add name="ScriptModule"

            preCondition="integratedMode"

            type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

      </modules>

      <handlers>

 

        <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

 

 

          <remove name="WebServiceHandlerFactory-ISAPI-2.0"/>

          <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>

 

</configuration>


Apr 4, 2013 at 2:20 PM
I checked your code and it works fine within my editor. May be the error is somewhere else.