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

RadCaptcha - handlers & httpHandlers related to IIS 7.0 pipeline

3 Answers 150 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Gideon
Top achievements
Rank 1
Gideon asked on 13 Oct 2009, 07:36 AM

Hello,

I'm using IIS 7.0, I would like to ask the difference between the integrated mode pipeline and classic mode pipeline reated to the handlers for RadCaptcha (classic mode works without adding any handlers for RadCaptcha) in web.config? Any performance issue related? Or both just do the same thing?

Here's the handler that I should add in web.config for integrated mode:
<handlers>  
     
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.CaptchaImageHandler" />  
</handlers>

And what the difference between the type's values below:
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.CaptchaImageHandler" verb="*" validate="false" />

 

<

 

add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>

Any answer or help for this would be appreciated.

Regards,

Omar Suria

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Pero
Telerik team
answered on 15 Oct 2009, 12:22 PM
Hi Omar,

The RadCaptcha image is served by an httpHandler that needs to be registered in the web.config file. It does not matter whether it is IIS 7.0 Integrated mode pipeline or Classic mode pipeline. The difference between these two modes is the place in the web.config file where the httpHandlers are registered. For example, when running in Classic mode the handlers specified in the system.WebServer section of the Web.config file are ignored. They must be specified by using the httpHandlers elements of the system.web section.

I am not aware if there are any differences regarding the performance.

You can find more information how to move an application to Integrated mode in the following Microsoft help article.

Regarding the difference in the type's values, the RadCaptcha handler inherits from the Telerik.Web.UI.WebResource handler and instead of specifying:

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

you can specify the handler to be of type="Telerik.Web.UI.WebResource", as specified in the following code:

<httpHandlers
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" 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.WebResource" /> 
</handlers>


All the best,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Roland
Top achievements
Rank 1
answered on 03 Dec 2009, 04:48 PM
Hello,

According to Q3 2009 source , CaptchaImageHandler does not inherit from WebResource.

CaptchaImageHandler : IHttpHandler

Which causes errors for RadScriptManager if you just replace the handler.



0
Pero
Telerik team
answered on 04 Dec 2009, 03:32 PM
Hi Roland,

Please excuse me for giving the wrong information. The RadCaptcha image handler does not inherit from the Telerik.Web.UI.WebResource handler, but the request to the CaptchaImageHandler is handled through the Telerik.Web.UI.WebResource and that is why you can use the same handler for the RadScriptManager and the RadCaptcha. Basically the following code should be placed in the web.config file:

<httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" 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.WebResource" />
</handlers>

In case you save the CaptchaImage in the Session object you should set EnableHandlerDetection="false" and use the following definition for the httpHandler:

<httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" 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" />
</handlers>



Sincerely yours,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Captcha
Asked by
Gideon
Top achievements
Rank 1
Answers by
Pero
Telerik team
Roland
Top achievements
Rank 1
Share this question
or