System.InvalidOperationException: A ScriptManager is required on the page to use ASP.NET AJAX Script Components. When we are uploading the pages and the dlls on the server, 2008 with IIS7 we are getting this particular error. Please help us to sort out this problem.
Hi, I'm using Ajax and the ControlToolkit with no problems on the IIS7 servers. Did you add the Script manager to your pages? You can also do it once with Master pages. Salute, Mark
Yes I Have. This is what I am getting while running the page : A ScriptManager is required on the page to use ASP.NET AJAX Script Components. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: A ScriptManager is required on the page to use ASP.NET AJAX Script Components. Source Error: Code: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: Code: [InvalidOperationException: A ScriptManager is required on the page to use ASP.NET AJAX Script Components.] AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control) in d:\E\AjaxControlToolkit_AjaxTk\Orcas\AjaxControlToolkit\ExtenderBase\ScriptObjectBuilder.cs:303 AjaxControlToolkit.ExtenderControlBase.OnLoad(EventArgs e) in d:\E\AjaxControlToolkit_AjaxTk\Orcas\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:307 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
<%@ Page Title="" Language="VB" MasterPageFile="~/pages/mainmast.master" AutoEventWireup="false" CodeFile="startpage.aspx.vb" Inherits="pages_startpage" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <link type="text/css" rel="stylesheet" href="../css/pwb.css" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table width="80%" border="0" cellspacing="4" cellpadding="4" class="tblDisplay">
We have purchased a hosting plan Windows 2008 IIS 7.0 but our page is targeting "Version Information:Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434 "
After adding the said line we are getting the beloew message Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls. Source Error: Code: Line 1: <%@ Page Title="" Language="VB" MasterPageFile="~/pages/mainmast.master" AutoEventWireup="false" CodeFile="startpage.aspx.vb" Inherits="pages_startpage" %> Line 2: <asp:ScriptManager ID="ScriptManager1" runat="server" /> Line 3: <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> Line 4: <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> Source File: /pages/startpage.aspx Line: 2 Version Information:Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
Add the Script manager for that page after the content line or to the Master Page. See the line that starts <asp:Content ? That's where your page content starts. Or you can add it in the Master page for all content pages like this: <%@ Master Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> </head> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html>