O'Reilly logo

ASP.NET MVC 4 Mobile App Development by Andy Meadows

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Authenticating BrewHow users

Out of the box, apps built using the Internet application template support forms authentication and provide facilities for users to log in and create accounts for our app. We can validate this by looking at the authentication node in the web.config file:

<system.web>
  <!-- -->
  <authentication mode="Forms">
    <forms loginUrl="~/Account/Login" timeout="2880" />
  </authentication>
  <!-- -->
</system.web>

The authentication node sets the authentication mode to Forms authentication and sets the login URL of our app to be ~/Account/Login. Looking at the Login action of the AccountController class, we see the action is invoking the WebSecurity.Login method for the user and redirecting them to the URL they initially attempted to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required