Captcha image not showing when using forms authentication

4 posts, 0 answers
  1. Eric Downey
    Eric Downey avatar
    52 posts
    Member since:
    Oct 2006

    Posted 08 Oct 2012 Link to this post

    HI,  I see you guys get this a lot but I couldn't find a recent one that had a similar circumstance - so here goes.  I have a very simple website that I developed a registration page for that included radCaptcha.  I then began implementing forms authentication and used a location tag in the web.config to make the register.aspx page and App_Themes directory available to anonymous users.  All of that worked until I got to the bottom of the page and found that the captcha image was broken.

    After doing some googling on the subject I saw a lot of references to this:

    <location path="Telerik.Web.UI.WebResource.axd">
        <system.web>
          <authorization>
            <allow users="*"/>
          </authorization>
        </system.web>
      </location>

    Unfortunately VS2010 does not seem to know where Telerik.Web.UI.WebResource.axd is (I get the blue squigly from resharper telling me it can't be found).  I have an entry in httHandlers and handlers groups for the axd.  Kind of at a dead stop at the moment - I just got the latest subscription so I know I'm up to date and as noted at the start of this post it worked fine when I didn't the forms authentication implemented.

    Thanx,

    Eric

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Oct 2012 Link to this post

    Hi,

    With reference to this forum thread, "Forms" authentication requires a registered user to be logged-in to the system in order to access a certain resource or a given page. If the user is not logged-in and tries to access a resource that requires a log-in (such as the RadCaptcha httpHandler in your case), he/she is redirected to the Login page. That is why the image is not shown, because it requires log-in.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eric Downey
    Eric Downey avatar
    52 posts
    Member since:
    Oct 2006

    Posted 09 Oct 2012 Link to this post

    Hi,

    Yes I understand the basic mechanics of forms authentication.  In fact I found the post you linked to and tried to use it.  The location tag for the web page that contains the captcha is working (with the exception of the image not appearing) however the location tag that is trying to point to the axd is not and I think that's where the problem is.  The path specified is the root of the website and there's no axd file.  Where can I find this file so I can point the path of the location tag to it?

    Thanx,

    Eric
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Oct 2012 Link to this post

    Hello,

    You can quickly check if the handler is registered by accessing it directly:

    http://<site root>/Telerik.Web.UI.WebResource.axd
    This request should succeed and return a blank page.


    Please take a look into the following documentation for more information about troubleshooting.

    General Troubleshooting
    Web Resources Troubleshooting

    Hope this helps.

    Regards,
    Princy.
Back to Top