CAPTCHA not showing - Forms Renderer

Topics: Standard packages, Troubleshooting
Jul 6, 2011 at 3:24 PM

Hi all,

I have a C1 site running under an IIS alias, i.e.

http://localhost/mysite

The Forms Renderer generates an absolute path for the CAPTCHA image which doesn't work, e.g.

/Renderers/Captcha.ashx?value=4F-E9-BB-7D-5A-00-26-BB-9D-8D-B0-2F-DC-7C-12-3E-A2-5A-CA-33-EE-D1-7C-8C-E9-7B-7E-3F-C5-62-F0-C3

Anyone know of a workaround?

Thanks,

Rob

Coordinator
Jul 6, 2011 at 4:22 PM

Hello,

As the workaround try to open file ~\Frontend\Composite\Forms\Renderer\Controls\FormsRender.ascx.cs, locate method GetCaptchaImageUrl() and try to add "~" before  the path, like this:

public string GetCaptchaImageUrl(string encryptedCaptchaValue)
	{
		var url = new UrlBuilder("~/Renderers/Captcha.ashx");
		url["value"] = encryptedCaptchaValue;
		return url.ToString();
	}

I will report the bug.

Jul 6, 2011 at 4:25 PM

Thanks Inna I'll give that a try.