RadCaptcha not working with ASP.NET 4.0 AppPool

2 posts, 0 answers
  1. William Plourde
    William Plourde avatar
    2 posts
    Member since:
    Aug 2009

    Posted 01 Jul 2010 Link to this post

    When I configure IIS to use the ASP.NET 4.0 AppPool, the RadCaptcha control doesn't function (broken image displays).  It functions file with ASP.NET 4.0 Classic AppPool.  This is a problem because none of my other httphandlers function correctly when using the classic app pool.
  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 06 Jul 2010 Link to this post

    Hi William,

    I tested the following code and web.config file in ASP.NET 4.0 AppPool, and received an exception:

    .aspx
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <telerik:RadCaptcha ID="RadCaptcha1" runat="server" ValidationGroup="Group" ErrorMessage="Wrong Code"
                ForeColor="Red">
            </telerik:RadCaptcha>
            <asp:Button ID="Button1" runat="server" Text="ValidateCOde" ValidationGroup="Group" />
        </div>
        </form>
    </body>
    </html>

    web.config
    <?xml version="1.0"?>
     
    <!--
      For more information on how to configure your ASP.NET application, please visit
      -->
     
    <configuration>
        <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="false" targetFramework="4.0" />
            <httpHandlers>
                <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false" />
            </httpHandlers>
        </system.web>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true">
            </modules>
            <handlers>
                <add name="Telerik.Web.UI.WebResource.axd*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource"  />
            </handlers>
        </system.webServer>
    </configuration>

    After commenting (removing) the Captcha httpHandler from the <httpHandlers> list everything worked out. Here is the modified web.config that works:
    <?xml version="1.0"?>
     
    <!--
      For more information on how to configure your ASP.NET application, please visit
      -->
     
    <configuration>
        <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="false" targetFramework="4.0" />
            <httpHandlers>
                <!--<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false" />-->
            </httpHandlers>
        </system.web>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true">
            </modules>
            <handlers>
                <add name="Telerik.Web.UI.WebResource.axd*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource"  />
            </handlers>
        </system.webServer>
    </configuration>


    Sincerely yours,
    Pero
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top