Resolving reCAPTCHA issue in BlogEngine.NET

by Rohit 10. December 2013 22:43

I was using Disqus as comment provider but many readers were not able to post a comment and didn't want to go through the registration process. Therefore I disabled Disqus and enabled Simple Captcha Extension of BlogEngine. Because of the static nature of Simple Captcha, I started receiving lot of spam from the last few days. I disabled Simple Captcha and enabled reCAPTCHA extension. But even after several attempts tweaking with reCAPTCHA files, reCAPTCHA image was not appearing with the comment box. I submitted this issue on Twitter and soon got the response from BlogEngine.

The reason for reCAPTCHA image not appearing was the change in the URL. To resolve this follow these steps:

  1. Go to: wwwroot\App_Code\Extensions\Recaptcha
  2. Open the file: RecaptchaControl.cs
  3. Replace the URL:  http://api.recaptcha.net/js/recaptcha_ajax.js  with  http://www.google.com/recaptcha/api/js/recaptcha_ajax.js

This change worked and now reCAPTCHA is working. One more point to note is to disable Simple Captcha before enabling reCAPTCHA Extension.

 

 

Tags: , ,

BlogEngine.NET

What makes a CTE different from a Derived Table/Subquery? When to use it?

by Rohit 23. November 2013 23:30

Common Table Expression (CTE) was introduced in SQL Server 2005. A CTE is a temporary result set similar to a derived table which is not stored as an object. This result set lasts only for the duration of the query. You can reference a CTE within a SELECT, INSERT, UPDATE or DELETE statement.

 

 

Example of a Derived Table:

 

Select EmpId, EmpName, Manager 
From 
(
	select 
	  A.EmployeeId AS EmpId
	, A.EmployeeName AS EmpName
	, B.Manager AS Manager
	from EmployeeMaster A
	inner join EmployeeDetails B
	on A.EmployeeId = B.EmployeeId
	group by A.EmployeeId, A.EmployeeName, B.Manager

) EmployeeInfo

 

Example of a CTE:

 

With EmployeeInfo (EmpId, EmpName, Manager)
As
(
	select 
	  A.EmployeeId AS EmpId
	, A.EmployeeName AS EmpName
	, B.Manager AS Manager
	from EmployeeMaster A
	inner join EmployeeDetails B
	on A.EmployeeId = B.EmployeeId
	group by A.EmployeeId, A.EmployeeName, B.Manager
)
select * from EmployeeInfo

 

 

So what makes CTE different from a derived table? A CTE has few advantages over a derived table: More...

Tags: , , ,

SQL Server | Technology

SQL Server Day Photos - October 26 2013, Microsoft Bangalore

by Rohit 26. October 2013 11:41

Like US, in India we don't have that many communities and live events. When I moved to Bangalore an year back, I searched for .NET and SQL Server user groups in Bangalore. Few .NET user groups exist but not active enough. I came across SQL Server Geeks from a colleague and attended few sessions of SQL Server Day in Bangalore. It is a great initiative by SQL Server Geeks.

 

 

Tags: ,

Blog | Life | SQL Server

About Rohit Prakash

Software Craftsman @ Fortune 100 Company. Technical Reviewer of few programming books.

A Single, Writer, Reader and Adventurist.

You can reach me at:

rohit [at] irohitable.com

Month List

Protected by Copyscape Web Plagiarism Software