Registerresult Fault

5 years ago
Hello Everyone,

I found an error in the log:

The controller for path '/registerresult/balabala' was not found or does not implement IController.
Page URL:   http://www.domain.com/registerresult/balabala
Referrer URL:   /balabala

It was happened during registration, sometimes but not always.

While I'm trying to re-generate the error by registering a new account, the return url is http://www.domain.com/registerresult/1

Any suggestions?
5 years ago
RegisterResult is a controller action which is being fired on registration complete or when error occurred on registration process.
/RegisterResult/1 - here 1 represent standard registration type

Look at the enumeration for all possible registration type

public enum UserRegistrationType : int
{
        /// <summary>
        /// Standard account creation
        /// </summary>
        Standard = 1,
        /// <summary>
        /// Email validation is required after registration
        /// </summary>
        EmailValidation = 2,
        /// <summary>
        /// A customer should be approved by administrator
        /// </summary>
        AdminApproval = 3,
        /// <summary>
        /// Registration is disabled
        /// </summary>
        Disabled = 4,
}


Here is the registrationresult action

public ActionResult RegisterResult(int resultId)
        {
            var resultText = "";
            switch ((UserRegistrationType)resultId)
            {
                case UserRegistrationType.Disabled:
                    resultText = _localizationService.GetResource("Account.Register.Result.Disabled");
                    break;
                case UserRegistrationType.Standard:
                    resultText = _localizationService.GetResource("Account.Register.Result.Standard");
                    break;
                case UserRegistrationType.AdminApproval:
                    resultText = _localizationService.GetResource("Account.Register.Result.AdminApproval");
                    break;
                case UserRegistrationType.EmailValidation:
                    resultText = _localizationService.GetResource("Account.Register.Result.EmailValidation");
                    break;
                default:
                    break;
            }
            var model = new RegisterResultModel()
            {
                Result = resultText
            };
            return View(model);
}
5 years ago
Thank you Sir,

But why I saw the Return URL in the log is: http://www.domain.com/registerresult/balabala (not 1, 2, 3, 4)

http://www.domain.com/balabala is the Referrer URL