پیاده سازی مطلب جاری برای ASP.NET Identity 2.x یک چنین تغییراتی را پیدا میکند:
app.UseCookieAuthentication(new CookieAuthenticationOptions { // ... Provider = new CookieAuthenticationProvider { OnValidateIdentity = context => { if(shouldIgnoreRequest(context)) // How to ignore Authentication Validations for static files in ASP.NET Identity { return Task.FromResult(0); } return container.GetInstance<IApplicationUserManager>().OnValidateIdentity().Invoke(context); } }, // ... });
private static bool shouldIgnoreRequest(CookieValidateIdentityContext context) { string[] reservedPath = { "/__browserLink", "/img", "/fonts", "/Scripts", "/Content", "/Uploads", "/Images" }; return reservedPath.Any(path => context.OwinContext.Request.Path.Value.StartsWith(path, StringComparison.OrdinalIgnoreCase)) || BundleTable.Bundles.Select(bundle => bundle.Path.TrimStart('~')).Any(bundlePath => context.OwinContext.Request.Path.Value.StartsWith(bundlePath,StringComparison.OrdinalIgnoreCase)); }
localForage is a fast and simple storage library for JavaScript.localForage uses localStorage in browsers with no IndexedDB or WebSQL.
localforage.setItem('key', 'value', function (err) { // if err is non-null, we got an error localforage.getItem('key', function (err, value) { // if err is non-null, we got an error. otherwise, value is the value }); });
:Framework Support
AngularJS
Angular 4 and up
Backbone
Ember
Vue
TypeScript:
import localForage from "localforage";
.NET Core + Angular Dashboard
Topics Covered:
- Building a dashboard application in Angular
- Building a Web API in .NET Core 2.0
- Using Chart.js to build stunning charts of different types
- Making HTTP requests using Angular to query a Web API
- Using Postman to send requests
- Working with Observables
- Using Input and Output decorators in Angular
- Using PostgreSQL and pgAdmin
- Automatically seeding a database with large amounts of sample data
- Styling an application using custom CSS and Bootstrap 4
- Using Map, Filter, and Reduce in Javascript
- Creating Routes in Angular
- Get, Put, Post, Patch Web API Controller Action request types
- Configuring your API for CORS