Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

HtmlEditorExtender (ASP.NET): Key cannot be null. Parameter name: key

$
0
0

Tengo este error y he buscado como solucionarlo y hasta la presente nada:

Server Error in '/PruebaTolkit' Application.


Key cannot be null.
Parameter name: key

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.ArgumentNullException: Key cannot be null.
Parameter name: key

Source Error:

Line 20: 
Line 21:           <asp:TextBox ID="TextBox1" TextMode="MultiLine" runat="server"></asp:TextBox>Line 22: <asp:HtmlEditorExtender ID="TextBox1_HtmlEditorExtender" runat="server" EnableSanitization ="false" TargetControlID="TextBox1"> Line 23:         <Toolbar >
Line 24:             <asp:Bold />


Source File: D:\VisuaStudio\PruebaTolkit\ejemplo.aspx Line: 22

Stack Trace:

/**********Este el web.config **********************

<?xml version="1.0" encoding="utf-8"?>
<!--
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">
<section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" />
</sectionGroup>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>

/*******************Página ejemplo.aspx**************

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ejemplo.aspx.vb" Inherits="ejemplo" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!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">
<div>

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:TextBox ID="TextBox1" TextMode="MultiLine" runat="server"></asp:TextBox>
<asp:HtmlEditorExtender ID="TextBox1_HtmlEditorExtender" runat="server" EnableSanitization ="false" TargetControlID="TextBox1">
<Toolbar >
<asp:Bold />
<asp:InsertImage />
<asp:Undo />
<asp:Redo />
<asp:Italic />
<asp:Underline />
<asp:StrikeThrough />
<asp:Subscript />
<asp:Superscript />
<asp:JustifyLeft />
<asp:JustifyCenter />
<asp:JustifyRight />
<asp:JustifyFull />
<asp:InsertOrderedList />
<asp:InsertUnorderedList />
<asp:CreateLink />
<asp:UnLink />
<asp:RemoveFormat />
<asp:SelectAll />
<asp:UnSelect />
<asp:Delete />
<asp:Cut />
<asp:Copy />
<asp:Paste />
<asp:BackgroundColorSelector />
<asp:ForeColorSelector />
<asp:FontNameSelector />
<asp:FontSizeSelector />
<asp:Indent />
<asp:Outdent />
<asp:InsertHorizontalRule />
<asp:HorizontalSeparator />
<asp:InsertImage />


</Toolbar>
</asp:HtmlEditorExtender>

</div>

</form>
</body>
</html>

/***************************************En explorador de soluciones y en Bin tengo: 

AjaxControlToolkit.dll

AntiXssLibrary.dll

EntityFramework.dll

EntityFramework.xml

HtmlAgilityPack.dll

HtmlSanitizationLibrary.dll

HtmlSanitizationLibrary.xml

SanitizerProviders.dll




[ArgumentNullException: Key cannot be null.
Parameter name: key]
   System.Collections.Hashtable.get_Item(Object key) +9355627
   System.Configuration.Provider.ProviderCollection.get_Item(String name) +15
   AjaxControlToolkit.Sanitizer.SanitizerProviderCollection.get_Item(String name) +36
   AjaxControlToolkit.Sanitizer.Sanitizer.Initialize() +244
   AjaxControlToolkit.Sanitizer.Sanitizer.GetProvider() +22
   AjaxControlToolkit.HtmlEditorExtender..ctor() +64
   ASP.ejemplo_aspx.__BuildControlTextBox1_HtmlEditorExtender() in D:\VisuaStudioDoncarlos\PruebaTolkit\ejemplo.aspx:22
   ASP.ejemplo_aspx.__BuildControlform1() in D:\VisuaStudioDoncarlos\PruebaTolkit\ejemplo.aspx:12
   ASP.ejemplo_aspx.__BuildControlTree(ejemplo_aspx __ctrl) in D:\VisuaStudioDoncarlos\PruebaTolkit\ejemplo.aspx:1
   ASP.ejemplo_aspx.FrameworkInitialize() in D:\VisuaStudioDoncarlos\PruebaTolkit\ejemplo.aspx.vb:912307
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.ejemplo_aspx.ProcessRequest(HttpContext context) +37
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>