locked
MSVS2012: Can't make AjaxTookit tookit working RRS feed

  • Question

  • User-1924544712 posted

    Hello

    I'm trying to make a demo project to see how the controls from the toolkit works. But whewn I'm launching the website from MSVS 2012 there is no toolkit controls. 

    What I have:

    1. Downloaded Ajax Toolkit for .NET 4.5

    2. Create simple Azure application with one WebRole.

    3. Added reference to AjaxControlsToolkit.dll there

    4. Created the page with following code

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebRole1.WebForm1" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxtoolkit" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
    		<ajaxtoolkit:ToolkitScriptManager ID="tsm1" runat="server" />
    
    		
    		<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" />
    
    		<ajaxtoolkit:HtmlEditorExtender ID="HtmlEditorExtender1"
    			TargetControlID="TextBox1" DisplaySourceTab="true" 
    			runat="server" >
    		</ajaxToolkit:HtmlEditorExtender>
    	</div>
        </form>
    </body>
    </html>
    

    5. Sanitizerrelated stuff is also added in web.config

    But when I'm launching the app and opening the page I don't see HTML extander there - only regular text field.

    Any ideas - what can it be and how to make it working?

    Wednesday, January 15, 2014 6:44 AM

All replies

  • User724169276 posted

    did you add assembly in web.config for ajax ?

     <add assembly="AjaxControlToolkit, Version=3.5.60919.0, Culture=neutral, 
                    PublicKeyToken=28f01b0e84b6d53e"/>

    Wednesday, January 15, 2014 7:07 AM
  • User-1924544712 posted

    This line was missed - so I've added it BUT it didn't help.

    Web.config looks like this:

    <?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>
        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
        <sectionGroup name="system.web">
          <section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit"/>
        </sectionGroup>
      </configSections>
      <system.diagnostics>
        <trace>
          <listeners>
            <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
              <filter type=""/>
            </add>
          </listeners>
        </trace>
      </system.diagnostics>
      <connectionStrings>
        <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-WebRole1-20140115154552;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-WebRole1-20140115154552.mdf"/>
      </connectionStrings>
      <!--
        For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
    
        The following attributes can be set on the <httpRuntime> tag.
          <system.Web>
            <httpRuntime targetFramework="4.5" />
          </system.Web>
      -->
      <system.web>
        <compilation debug="true" targetFramework="4.5">
          <assemblies>
            <add assembly="AjaxControlToolkit, Version=4.5.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
          </assemblies>
        </compilation>
        <httpRuntime/>
        <sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider">
          <providers>
            <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"/>
          </providers>
        </sanitizer>
        <pages controlRenderingCompatibilityVersion="4.0">
          <namespaces>
            <add namespace="System.Web.Optimization"/>
          </namespaces>
          <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
          </controls>
        </pages>
        <authentication mode="Forms">
          <forms loginUrl="~/Account/Login" timeout="2880" defaultUrl="~/"/>
        </authentication>
        <profile defaultProvider="DefaultProfileProvider">
          <providers>
            <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
          </providers>
        </profile>
        <membership defaultProvider="DefaultMembershipProvider">
          <providers>
            <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
          </providers>
        </membership>
        <roleManager defaultProvider="DefaultRoleProvider">
          <providers>
            <add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
          </providers>
        </roleManager>
        <!--
                If you are deploying to a cloud environment that has multiple web server instances,
                you should change session state mode from "InProc" to "Custom". In addition,
                change the connection string named "DefaultConnection" to connect to an instance
                of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express.
          -->
        <sessionState mode="InProc" customProvider="DefaultSessionProvider">
          <providers>
            <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/>
          </providers>
        </sessionState>
      </system.web>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246"/>
            <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246"/>
            <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
      </entityFramework>
    </configuration>

    Any ideas?

    Wednesday, January 15, 2014 9:17 AM
  • User724169276 posted

    hello globus,

    where you added dll ?? i hope you added ajax dll also ???after adding the dll if issue persists then clear the solution restart the application and build it again ...

    Wednesday, January 15, 2014 10:07 AM
  • Wednesday, January 15, 2014 11:06 PM
  • User-1175871172 posted

    Hi, add the ajaxcontroltoolkit.ddl into your project bin's folder. Then in your VS project, add reference to the .dll inside the bin. Ur compiled application should be working after that.

    Thursday, January 16, 2014 1:46 AM