0

This is my first ASP.NET project and I want to make a easy login. I tried this: Link

but I can't understand basic things:

public class AccountController : ApiController
{
    public bool Post(LogOnModel model)
    {
        if (model.Username == "john" && model.Password == "secret")
        {
            FormsAuthentication.SetAuthCookie(model.Username, false);
            return true;
        }
        return false;
    }
}

1) How to code a correct call to this controller?

2) Should not somethings like "credentials" or "Username + PW" instead a LogOnModel?

Community
  • 1
  • 1
spitzbuaamy
  • 751
  • 2
  • 10
  • 25

0 Answers0