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

Captcha image not showing when using forms authentication

3 Answers 350 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Eric Downey
Top achievements
Rank 1
Eric Downey asked on 08 Oct 2012, 07:25 PM
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

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Oct 2012, 07:38 AM
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.
0
Eric Downey
Top achievements
Rank 1
answered on 09 Oct 2012, 12:25 PM
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
0
Princy
Top achievements
Rank 2
answered on 10 Oct 2012, 05:19 AM
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.
Tags
Captcha
Asked by
Eric Downey
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Eric Downey
Top achievements
Rank 1
Share this question
or