DependencyResolver.Current.GetService always returns null
In the post you refer to, you were not told to use DependencyResolver, just that it's possible to use it. You shouldn't use it, as it's a well known anti-pattern.
While using the DependencyResolver directly should work, you really shouldn't do it that way.
Instead, you should use Constructor Injection, which would be to have your class take the type as a parameter of your constructor.
public class MyController : Controller {
IReCaptchaValidator _validator;
public MyController(IReCaptchaValidator validator)
{
_validator = validator;
}
}
Then, in your method:
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Registe(RegisterModel model)
{
var myObject = _validator;
}