locked
How to create a Login Page with LightSwitch RRS feed

  • Question

  • I am new to Lightswitch .I want to create a Lightswitch appliaction starting with a Login Page redirecting to other pages after success Login
    Sunday, October 7, 2012 9:31 AM

Answers

  • Hi Asrar,

    do you have any special requirement why you want to create your own login screen?

    If you want authentication, you can simply enable it inside the properties of your lightswitch project (Inside Access Control tab). There you can choose between Windows Authentication and Forms based authentication.

    If you activate that, then a user must authenticate himself first.

    With kind regards,

    Konrad

    • Proposed as answer by Angie Xu Tuesday, October 16, 2012 2:38 AM
    • Marked as answer by Otomii Lu Thursday, October 18, 2012 1:47 AM
    Monday, October 8, 2012 12:04 PM

All replies

  • Hi Asrar,

    do you have any special requirement why you want to create your own login screen?

    If you want authentication, you can simply enable it inside the properties of your lightswitch project (Inside Access Control tab). There you can choose between Windows Authentication and Forms based authentication.

    If you activate that, then a user must authenticate himself first.

    With kind regards,

    Konrad

    • Proposed as answer by Angie Xu Tuesday, October 16, 2012 2:38 AM
    • Marked as answer by Otomii Lu Thursday, October 18, 2012 1:47 AM
    Monday, October 8, 2012 12:04 PM
  • When I tried that nothing happened. I found someone online who said I needed to add these lines to my Web.config in the Configuration Section:

    <location path="HTMLClient">
        <system.web>
          <authorization>
            <deny users="?" />
          </authorization>
        </system.web>
      </location>

    I added them and then Authentication kicked in.

    I'm not sure why other LS users don't need to do that step.

    I guess I'm special!



    bill ross

    Wednesday, November 27, 2013 2:32 PM
  • Hi guys,

    I've got the same problem.

    Now I added the code above to my webconfig and tadaaa, Loginscreen...

    But how can I login? Where can I create users an how can I administrate them later?

    Thanks

    Carsten

    PS: Meanwhile I found some Infos about this topic but there silverlight is used.
    With this a webinterface for mobile devices would be total nonsens if iOS and Android don't use silverlight.
    Could this be true?

    • Edited by Telefisch Sunday, February 7, 2016 12:56 PM New Informations found
    Sunday, February 7, 2016 12:32 PM
  • Ok...

    Am I the first who wants to have a login?

    I thought Lightswitch does it all automatically?

    So till now I managed to get this Login-Screen:

    If this is included in the standard, why can noone tell me how to login and how to define users?
    This couldn't be true!

    ADefwebserver, your example is nice but the original program seems no longer to be available so the workaround without the rest of the project doesnt work, right?

    Sunday, February 7, 2016 3:17 PM
  • ADefwebserver, your example is nice but the original program seems no longer to be available so the workaround without the rest of the project doesnt work, right?

    You can download the sample code on my download page.

    Basically, without using my code you have to use a Silverlight client to administer the users. You can allow users to self-register using this code:

    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/166/Allowing-Users-To-Self-Register-In-Your-LightSwitch-Website.aspx


    Unleash the Power - Get the LightSwitch HTML Client / SharePoint book

    http://LightSwitchHelpWebsite.com

    Sunday, February 7, 2016 4:18 PM
  • Hmm...

    seems not to be so easy.

    I'm using the VS 2015 Community-Version and could not open the An HTML MVC LightSwitch Security Administration because of wrong version.

    I don't want the user to self-register so your first example is absolutely best for me but I couldn't open ist :(

    Monday, February 8, 2016 5:57 PM
  • You can upgrade he project to VS2015.

    If this is a problem, the code would not be much use to you anyway because it is just an example of code that will work. You would have to implement the code in your own project manually.


    Unleash the Power - Get the LightSwitch HTML Client / SharePoint book

    http://LightSwitchHelpWebsite.com

    Monday, February 8, 2016 9:32 PM
  • Of course I wanted VS to Upgrade the project but it didn't work.
    Tuesday, February 9, 2016 6:07 AM
  • Tuesday, February 9, 2016 6:40 AM
  • Hello Michael,

    thanks for this, I downloaded the project yesterday and also bought one of your ebooks.

    So now I will have to do a little work with ist.
    If there are any questions I'll come back ;)

    Thanks

    Carsten

    Wednesday, February 10, 2016 1:22 PM