Recently, in one of my project I need a captcha for my application. Just a google search provides number of options. I need a open source solution, so I go with krisanov’s solution. I just download and try to using that on my project. However it doesn’t works fine. Just follow the instruction mention by mudasar in this url. But I have encountered several problems (that is it doesn’t display any captcha image) the when I added that into my project, which leads to write this post.
Below are the steps that I have followed:
1) Just download the captcha from the url.
2) Add the reference into the project by “Right Click on the Project –> Add Reference”.
3) After that you need to include the below lines into web.config file:
<system.web>
<httpHandlers>
<add verb="GET" path="CaptchaImage.aspx" type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha"/>
</httpHandlers></system.web>
<location path="CaptchaImage.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
What previously done, I have missed out entire “location” element, which is also not mentioned in the mudasar’s tutorial. I have found this solution in this asp.net forum thread.
Hope this helps to someone!
0 comments :