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!
- In Visual Studio
- Under the LsCoreProject.Server
- Create a folder, name it Content
- Right click on the folder
- Add, Existing item
- From our project you downloaded, LsCoreProject-master
- Add the Aspx.css file
- Right click on the LsCoreProject.Server
- Add, Existing item
- From our project you downloaded, LsCoreProject-master
- Add the following files
- ChangePassword.aspx
- LogIn.aspx
- LogOut.aspx
- 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:
- Create the project
- Add external CSS
- Add external scripts
- Update the default.htm
- — You
- Create the security data source
- Screens for permissions
- Screens for role management
- Screens for user management
- Tables for tile menus
- Screens for icon management
- Screens for menu management
- Create a tile menu screen
- Create a database project
- How to deploy successfully
- Wrap up
Cet article est plein de conseils
L’intégrɑlité ԁes articles sont incontestaƄlement fascinants
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?
Thomas
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.
If you want to obtain much from this article then you have to apply such methods to your won website.
Explain?