Search code examples
authenticationframeworksoverridingaspnetboilerplateabp-framework

How to override the login page provided by abp.io?


I tried to override my custom login with LoginModel and Login.cshtml as described here.

After replacing Login.cshtml and myCustomeLoginModel.cs, this error is shown :

'LoginModel' does not contain a constructor that takes 2 arguments

and this is the code of myCustomLoginModel.cs after replacing :

 public class myCustomLoginModel: LoginModel
    {
        public myCustomLoginModel(IAuthenticationSchemeProvider schemeProvider,
                                  IOptions<Volo.Abp.Account.Web.AbpAccountOptions> accountOptions)
        : base(schemeProvider, accountOptions)
        {
        }
    }

and then all properties of myCustomLoginModel is not recognized in Login.cshtml like this : The properties of myCustomLoginModel is not recognized

What did I miss ?

I tried to send any text for @hikalkan, the contributor of this concept at abp.io, but I did not found any email or contact info that I can use.


Solution

  • I found that I had a fault! I had created a class named 'LoginModel.cs' under the Login.cshtml. I don't know how this happened. But this causes errors.

    If I followed exactly what was in the document, it would work nicely!