Book Image

ServiceStack 4 Cookbook

Book Image

ServiceStack 4 Cookbook

Overview of this book

Table of Contents (18 chapters)
ServiceStack 4 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and displaying a login and registration page based on authentication


In this recipe, we will create a HelloWorld page that requires authentication to be rendered by the server. We will also go over binding a simple form, with validation, to register new users and store information about them using ServiceStack's IUserAuthRepository.

Getting ready

If you are starting from a new project, please see the section Creating a ServiceStack solution with Visual Studio and NuGet in Appendix A, Getting Started. We also recommend installing the ServiceStackVS-Visual Studio extension if you are using Visual Studio 2013 Community Edition or later. If you have this extension, create a new project using the ServiceStack ASP.NET with Bootstrap template.

Note

Note that the ServiceStackVS extension can be found at https://visualstudiogallery.msdn.microsoft.com/5bd40817-0986-444d-a77d-482e43a48da7.

How to do it…

  1. Create a new ServiceStack ASP.NET with Bootstrap project, as follows:

  2. Add the ServiceStack.Ormlite...