Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mondor's MSCaptcha won't load image when deployed to hosting service

Tags:

c#

asp.net

Mondor's MSCaptcha control runs and displays on the local dev machine but doesn't display its genrated image when deployed to the shared server hosting service.

// what my web.config says:

<handlers>
<add name="MSCaptchaImage" 
   path="CaptchaImage.axd" 
   verb="GET" 
   type="MSCaptcha.CaptchaImageHandler, MSCaptcha"
   preCondition="integratedMode,runtimeVersionv2.0"/>
</handlers>

Yes, I FTP the .dll(s) to the bin directory on the host server and my local code running from IIS7 on Vista runs as expected. Anything else you might need to assit please ask but I need to figure this one out as I'm stumped and note I have no control of the server at the host provider

note: I've observed somebody else has this problem as responded to at asp.net [1] lucky for me all of my Passport and Windows DeadOnArrival credentials are totally FUBAR and asp.net won't even send me a forgotten password as it doesn't know me anymore either so I can't get involed in the asp.net forums.

[1] http://forums.asp.net/p/1468509/3395243.aspx

like image 943
Metro Milwaukee Avatar asked Dec 03 '22 07:12

Metro Milwaukee


2 Answers

Got it...

Web.config is Case Sensitive.. So change the Capital "C" to small "c" in captchaImageHandler

Change: type="MSCaptcha.*C*aptchaImageHandler, MSCaptcha" To: type="MSCaptcha.*c*aptchaImageHandler, MSCaptcha"

Hope this will work for you.. happy coding...:)

like image 145
akumar2508 Avatar answered Jan 25 '23 22:01

akumar2508


This worked for me, modify your web.config file

Section 1.

<system.webServer>
    <handlers>
        <add name="MSCaptcha" verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
    </handlers>
</system.webServer>

Section 2.

<system.web>
    <httpHandlers>
        <add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>
    </httpHandlers>
</system.web>
like image 27
Chris Avatar answered Jan 26 '23 00:01

Chris