Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi All,

 

Here is the conteny of my page:

 

<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
   <title>Untitled Page</title>
</head>
<body>
   <form id="form1" runat="server">
       <asp:ScriptManager ID="ScriptManager1" runat="server"/>
       <div>
           <asp:TextBox runat="server" ID="txtPassword"></asp:TextBox>
           <cc1:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="txtPassword"/>
       </div>
   </form>
</body>
</html>

 

When I try to run this page I get this screen:

Server Error in '/AJAXFuturesEnabledWebSite1' Application.

--------------------------------------------------------------------------------

 

The control with ID 'PasswordStrength1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

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: The control with ID 'PasswordStrength1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

 

Source Error:

 

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:

 

 

[invalidOperationException: The control with ID 'PasswordStrength1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.]

System.Web.UI.ExtenderControl.get_ScriptManager() +198

System.Web.UI.ExtenderControl.RegisterWithScriptManager() +151

System.Web.UI.ExtenderControl.OnPreRender(EventArgs e) +17

AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) +44

System.Web.UI.Control.PreRenderRecursiveInternal() +86

System.Web.UI.Control.PreRenderRecursiveInternal() +170

System.Web.UI.Control.PreRenderRecursiveInternal() +170

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041

 

 

 

 

--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.1378; ASP.NET Version:2.0.50727.1378

 

I cannot understand what I am doing wrong. I even downloaded an example from http://www.asp.net/learn/ajax-videos/video-97.aspx. Even this gave me the same error.

 

Can anyone help?

 

Cheers, Dave.

Posted

Web Config

 

Just in case this is of any use here is the web config:

<?xml version="1.0"?>
<!-- 
   Note: As an alternative to hand editing this file you can use the 
   web admin tool to configure settings for your application. Use
   the Website->Asp.Net Configuration option in Visual Studio.
   A full list of settings and comments can be found in 
   machine.config.comments usually located in 
   \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<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>
<system.web>
	<!-- 
           Set compilation debug="true" to insert debugging 
           symbols into the compiled page. Because this 
           affects performance, set this value to true only 
           during development.

           Visual Basic options:
           Set strict="true" to disallow all data type conversions 
           where data loss can occur. 
           Set explicit="true" to force declaration of all variables.
       -->
	<compilation debug="true" strict="false" explicit="true">
		<assemblies>
			<add assembly="System.Core, 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.Data.DataSetExtensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
			<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
			<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
			<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
	</compilation>
	<pages>
		<namespaces>
			<clear/>
			<add namespace="System"/>
			<add namespace="System.Collections"/>
			<add namespace="System.Collections.Generic"/>
			<add namespace="System.Collections.Specialized"/>
			<add namespace="System.Configuration"/>
			<add namespace="System.Text"/>
			<add namespace="System.Text.RegularExpressions"/>
			<add namespace="System.Linq"/>
			<add namespace="System.Xml.Linq"/>
			<add namespace="System.Web"/>
			<add namespace="System.Web.Caching"/>
			<add namespace="System.Web.SessionState"/>
			<add namespace="System.Web.Security"/>
			<add namespace="System.Web.Profile"/>
			<add namespace="System.Web.UI"/>
			<add namespace="System.Web.UI.WebControls"/>
			<add namespace="System.Web.UI.WebControls.WebParts"/>
			<add namespace="System.Web.UI.HtmlControls"/>
		</namespaces>
		<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>
	<!--
           The <authentication> section enables configuration 
           of the security authentication mode used by 
           ASP.NET to identify an incoming user. 
       -->
	<authentication mode="Windows"/>
	<!--
           The <customErrors> section enables configuration 
           of what to do if/when an unhandled error occurs 
           during the execution of a request. Specifically, 
           it enables developers to configure html error pages 
           to be displayed in place of a error stack trace.

       <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
           <error statusCode="403" redirect="NoAccess.htm" />
           <error statusCode="404" redirect="FileNotFound.htm" />
       </customErrors>
       -->
	<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" compilerOptions="/warnaserror-" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
			<providerOption name="CompilerVersion" value="v3.5"/>
		</compiler>
		<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/optioninfer+" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
			<providerOption name="CompilerVersion" value="v3.5"/>
		</compiler>
	</compilers>
</system.codedom>
<!-- 
       The system.webServer section is required for running ASP.NET AJAX under Internet
       Information Services 7.0.  It is not necessary for previous version of IIS.
   -->
<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>
		<remove name="WebServiceHandlerFactory-Integrated"/>
		<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>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...