HTTPS webforms - security exception due to Recapcha being non secure

Dec 11, 2014 at 8:54 PM
Ok.. so
Step 1 Downloaded the project zip and referenced the Recapcha.dll
Step 2 Created and setup the control in a page to use Public Key and Private Key
Step 3 Added the control to an ASPX page using the following code.
<recaptcha:RecaptchaControl ID="RecaptchaControl1" runat="server"
            PublicKey="XXXXXXXXXXXXXXXXXXXXX"
                        PrivateKey="XXXXXXXXXXXXXXXXXXXXXXXXX"
                        Theme="clean"
            /> 
Worked great in Development. but in our secure staging environment it causes a security exception because it is coming from a nonsecure source.

The documentation seemed to indicate that the control would detect HTTPS, but that doesn't seem to be the case. I have also seen some code that seems to be RAZOR code that specifies https. I can't figure out how or where to do this in webforms.

Any help would be greatly appreciated!@!'

Rob
Dec 11, 2014 at 9:16 PM
Found it...

OverrideSecureMode="True"

needs to be set. e.g.
       <recaptcha:RecaptchaControl ID="RecaptchaControl1" runat="server" 
            PublicKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
                        PrivateKey="YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
                        Theme="clean" OverrideSecureMode="True"
            />