LS2013 Core Project – Add LogIn/LogOut/Register/ChangePassword

This one we’ll make easy for you. Since LightSwitch uses plain old ASP.NET authentication, you can use the built in functionality and wizards that are already part of the framework. No reason to do anything fancy and its able to be fully embedded, etc.

From this you will get the functionality to allow users to self register, login, logout and change their passwords. Its this easy… really!

  1. In Visual Studio
  2. Under the LsCoreProject.Server
  3. Create a folder, name it Content
  4. Right click on the folder
  5. Add, Existing item
  6. From our project you downloaded, LsCoreProject-master
  7. Add the Aspx.css file
  8. Right click on the LsCoreProject.Server
  9. Add, Existing item
  10. From our project you downloaded, LsCoreProject-master
  11. Add the following files
  12. ChangePassword.aspx
  13. LogIn.aspx
  14. LogOut.aspx
  15. Register.aspx

Some notes about how I have these setup

ChangePassword – User needs to be logged in (authenticated) before they can change their password. If they are not, they will be redirected to the login page.
Register – On success, will be logged in (authenticated) and redirected into the app.

Wow! So far so good eh? And we’ve barely started…

Next… Create The Security Data Source

Here are the topics and their logical order:

  1. Create the project
  2. Add external CSS
  3. Add external scripts
  4. Update the default.htm
  5. — You
  6. Create the security data source
  7. Screens for permissions
  8. Screens for role management
  9. Screens for user management
  10. Tables for tile menus
  11. Screens for icon management
  12. Screens for menu management
  13. Create a tile menu screen
  14. Create a database project
  15. How to deploy successfully
  16. Wrap up

6 thoughts on “LS2013 Core Project – Add LogIn/LogOut/Register/ChangePassword

  1. Cet article est plein de conseils

  2. L’intégrɑlité ԁes articles sont incontestaƄlement fascinants

  3. Thomas says:

    Hi Dale,
    i spent a whole day for finding the Password complexity in your core Project 🙂

    First i wonder why nothing happens in complexity when i changed the complexity in the web.config:

    <add name="AspNetMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="_IntrinsicData" applicationName="LsCoreProject" requiresUniqueEmail="false" requiresQuestionAndAnswer="false" minRequiredNonalphanumericCharacters=”0″ minRequiredPasswordLength=”3″/>

    Later i found that the pw complexity is hard coded in itglshelper.js.
    Please, will you explain to me why the web.config Setting doesnt work in the core project?
    im not familar with the SqlMembershipProvider pw complexity…
    is it enough to change the complexity only in the itglshelper oder must i change both minRequiredNonalphanumericCharacters=”0″ minRequiredPasswordLength=”3″ and itglshelper.js?


    • dwm9100b says:

      Main reason why I used it internally was so I could control/test the entered pwd on the client before it went to the server. In hindsight this should change and will look to do that in a future update.

  4. Elwood says:

    If you want to obtain much from this article then you have to apply such methods to your won website.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: