RadCaptcha - handlers & httpHandlers related to IIS 7.0 pipeline

4 posts, 1 answers
  1. Gideon
    Gideon avatar
    7 posts
    Member since:
    Jul 2009

    Posted 13 Oct 2009 Link to this post

    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

     

     

  2. Answer
    Pero
    Admin
    Pero avatar
    1156 posts

    Posted 15 Oct 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roland
    Roland avatar
    156 posts
    Member since:
    Feb 2009

    Posted 03 Dec 2009 Link to this post

    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.



  5. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 04 Dec 2009 Link to this post

    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.
Back to Top