This is a migrated thread and some comments may be shown as answers.

RadCaptcha not working with ASP.NET 4.0 AppPool

1 Answer 125 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
William Plourde
Top achievements
Rank 1
William Plourde asked on 01 Jul 2010, 08:34 PM
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.

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 06 Jul 2010, 09:48 AM
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
Tags
Captcha
Asked by
William Plourde
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or