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

RadCaptcha image breaks after adding a custom HttpModule

2 Answers 30 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Augusto
Top achievements
Rank 1
Augusto asked on 19 Jun 2014, 06:59 AM
Hi all,

I'm facing a wierd issue with RadCaptcha, it was working perfectly until I decided to add custom HttpModule to the web application. (image doesn't show up).
If I remove the custom module from web.config RadCaptcha starts to work again.

<modules runAllManagedModulesForAllRequests="true">
      <add name="MyModule" type="MyModule" />
</modules>


RadCaptcha doesn't work with the custom HttpModule either on the local dev machine or in production (Azure).

I checked few forum posts and gave a try to set the ImageStorageLocation property of RadCaptcha to Session:

<httpHandlers>
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession, Telerik.Web.UI" verb="*" validate="false" />
</httpHandlers>
 
<handlers>
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession, Telerik.Web.UI" />
</handlers>


Even tho I'm not running in a web farm or web garden, but this doesn't solve the issue.

Any ideas why this is happening?

Note: using Telerik version: 2014.1.403.45

Thanks for the help!

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Slav
Telerik team
answered on 23 Jun 2014, 05:26 PM
Hi Augusto,

The RadCaptcha control loads its image via an HttpHandler, so my guess is that the custom HttpModule you add is changing something in the request for this handler that is leading to the problem at hand. Nevertheless, I cannot determine why this happens without examining the custom module you created.

Could you please isolate the problematic scenario in a simple, fully runnable project so that I can inspect it locally and pinpoint the exact cause for the issue?

Regards,
Slav
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Augusto
Top achievements
Rank 1
answered on 10 Nov 2014, 11:36 AM
You were right I found the problem in the custom HttpModule (URL rewriting).
I have since switched to ASP.NET FriendlyUrls and things work without any problem (and much easier too).
Thanks!
Tags
Captcha
Asked by
Augusto
Top achievements
Rank 1
Answers by
Slav
Telerik team
Augusto
Top achievements
Rank 1
Share this question
or