Try ASPSecurityKit before you buy
- These restrictions apply on the libraries without a license key.
- Trial source packages are also available to let you evaluate the power and usefulness of source packages in rapid application development (RAD). Additionally, a source package helps in quickly evaluating ASPSecurityKit libraries as you get implementation of essential components (such as data models, migrations, repositories, dependency injection etc. that ASPSecurityKit requires from you to give you the unmatched flexibility and extensibility.
Guide me, please?
Sure. In the following sections we’ll get you up with a sample project that has end-to-end protection by ASPSecurityKit’s security pipeline and many important user related workflows such as sign up, sign in, account settings (changing username, password, basic details) and much more, without writing a single line of code.
This walkthrough sets up an ASP.NET Core MVC sample project; you can also setup and evaluate ASPSecurityKit for an ASP.NET Core API or ServiceStack project just by changing the trial source package.
Trial source packages aren’t available at the moment for .NET Framework libraries (ASP.NET MVC5 or Web API), but ASP.NET Core based trial gives you a similar experience to evaluate capabilities of ASPSecurityKit. However, if you feel you must evaluate ASPSecurityKit on .NET Framework, you can contact us at [email protected] and we’ll be happy to help.
- You need to register on the dashboard to install a trial source package. There’s no fee to sign up. A dashboard account is necessary to use the ASPSecurityKit’s NuGet Tools.
- Of course you need a compatible Visual Studio version installed; for the sake of this walkthrough, we recommend VS2019 or higher with ASP.NET Core 3.1, though you should be able to use prior versions of Visual Studio such as VS2017.
If you face any issue or have any question, drop us a line at [email protected].
Create the project
In Visual Studio, open the New Project dialog.
Choose the programming language as CSharp and ASP.NET Core Web Application as the template.
Provide the project name and other information.
Choose the Empty project template and click on the Create button.
Install the ASPSecurityKit library package
As part of this step, we’ll install the ASPSecurityKit.NetCore NuGet package, which provides full ASPSecurityKit capabilities to build secure and reliable modern MVC web applications and API platforms on the ASP.NET Core. Check out the comprehensive security pipeline article to understand the multi-stage identity and access verification workflow ASPSecurityKit provides.
Open Package Manager (PM) Console and make sure that the selected project is the web application project just created.
Type the following command and hit enter:
Make sure that the package installs successfully
You can also use the Package Manager UI to install the above package.
Install the source package into the project
As part of this step, we’ll install the Trial-ASP.NET Core Mvc source package. A source package gives you useful functionality in source code form. For instance, this trial package provides ready-to-use data models, migrations, repositories, managers related to user account management as well as end-to-end implementation of web operations (such as sign up, sign in, account settings, etc.) as well as graceful error handling and error pages into your sample project without having to write a single line of code.
If you instead want to try out ASPSecurityKit for an API project, you should install Trial-ASP.NET Core API source package.
Note: Being a trial package, a major portion of the source code is instead delivered as part of a demo binary (dll) assembly file.
Follow these steps to install a source package. On the ‘Install a Source Package’ screen, make sure you select NetCoreMvc as the platform and Trial as the source package.
On clicking Next, specify application configuration:
Upon successful installation, you should see several new items added to the project along with a lib folder having the demo assembly.
Next, make sure you also install the node dependencies. The Trial ASP.NET Core Mvc source package we’ve just installed have some script dependencies such as bootstrap, jquery, jtable, etc. which have been configured as NPM dependencies.
Create the database
The Trial-ASP.NET Core Mvc source package we had installed in the prior step, comes with EF migrations and T-SQL scripts so you can create the database backing the models of your new project immediately.
- Verify the connectionString: Open appsettings.json file from Solution Explorer and verify that the DefaultConnection has a valid connectionString as per SQL Server version available on your machine. If it’s not, make the appropriate changes.
- Open Package Manager Console and make sure that the selected project is the web application project we’ve been working with in this walkthrough.
- Type the following command and hit enter:
update-database -Context DemoDbContext
- If you receive an error stating something like:
- “The term update-database is not recognized as the name of a cmdlet, function, script file, or operable program.”, you should close and restart Visual Studio, and open the same solution. For more information about this issue, check out the troubleshooting section.
- Make sure that the database is created successfully.
- You will see messages something like “Applying migration …”. If all goes well, the last message that you see is “Done” (with EF Core; with EF framework, it’s “Running seed method”).
We’re done, Let’s give it a run!
Press F5/ctrl+F5 to run the application. Try signing up a new user. You can sign in using the super admin credentials – username as the one you gave during the source package installation (which you can also find in the appsettings.json file) and the default password ‘admin’. Try out flows like account settings.