asp.net-core-3.1

Is there a way to use Identity Server features in asp.net core 3.1 Rest-API

拥有回忆 提交于 2021-01-28 02:34:37
问题 I’m working in a project with Rest-API in the server by using asp.net core 3.1, angular as front for single page application. From each client, the user would need to supply their username and password in order to access protected parts of the web API. I would like to use the features of Identity Server to access the ASP.NET Core Identity UserManager, RoleManager, and SignInManagers to determine if the supplied username and password is valid. I haven't ever been done this before and I tried

Is there a way to use Identity Server features in asp.net core 3.1 Rest-API

心不动则不痛 提交于 2021-01-27 20:50:23
问题 I’m working in a project with Rest-API in the server by using asp.net core 3.1, angular as front for single page application. From each client, the user would need to supply their username and password in order to access protected parts of the web API. I would like to use the features of Identity Server to access the ASP.NET Core Identity UserManager, RoleManager, and SignInManagers to determine if the supplied username and password is valid. I haven't ever been done this before and I tried

Why aren't my IdentityRoles and ApplicationUsers populating into my database?

心不动则不痛 提交于 2021-01-27 07:10:43
问题 I am having trouble seeding users in my .net core 3.1 web app. The corresponding tables are being created on SQL Server, but no rows are being created when I run my app. I don't know why the database isn't being populated. Can anybody spot the issue? DBInitializer file to seed users into database public class DBInitializer { public static async Task Initialize(IServiceProvider services) { ApplicationDbContext database = services.GetRequiredService<ApplicationDbContext>(); UserManager

JWT authentication issue with web api plugin in nopCommerce 4.30

会有一股神秘感。 提交于 2021-01-24 15:57:52
问题 I implement JWT authentication for authorization using access token or bearer token in web api plugin with nopCommerce version 4.30. It is working fine with default source of nopCommerce 4.30. But when i used my API plugin with any Seven spikes plugins (SevenSpikes.Nop.Plugins.AjaxCart, SevenSpikes.Nop.Plugins.QuickView, etc), its not working and threw exception like "System.ArgumentException: 'Duplicate Controller with DuplicateControllerName:NopAjaxCartShoppingCart is already added'". Here

JWT authentication issue with web api plugin in nopCommerce 4.30

心不动则不痛 提交于 2021-01-24 15:52:33
问题 I implement JWT authentication for authorization using access token or bearer token in web api plugin with nopCommerce version 4.30. It is working fine with default source of nopCommerce 4.30. But when i used my API plugin with any Seven spikes plugins (SevenSpikes.Nop.Plugins.AjaxCart, SevenSpikes.Nop.Plugins.QuickView, etc), its not working and threw exception like "System.ArgumentException: 'Duplicate Controller with DuplicateControllerName:NopAjaxCartShoppingCart is already added'". Here

JWT authentication issue with web api plugin in nopCommerce 4.30

空扰寡人 提交于 2021-01-24 15:52:14
问题 I implement JWT authentication for authorization using access token or bearer token in web api plugin with nopCommerce version 4.30. It is working fine with default source of nopCommerce 4.30. But when i used my API plugin with any Seven spikes plugins (SevenSpikes.Nop.Plugins.AjaxCart, SevenSpikes.Nop.Plugins.QuickView, etc), its not working and threw exception like "System.ArgumentException: 'Duplicate Controller with DuplicateControllerName:NopAjaxCartShoppingCart is already added'". Here

JWT authentication issue with web api plugin in nopCommerce 4.30

六眼飞鱼酱① 提交于 2021-01-24 15:48:33
问题 I implement JWT authentication for authorization using access token or bearer token in web api plugin with nopCommerce version 4.30. It is working fine with default source of nopCommerce 4.30. But when i used my API plugin with any Seven spikes plugins (SevenSpikes.Nop.Plugins.AjaxCart, SevenSpikes.Nop.Plugins.QuickView, etc), its not working and threw exception like "System.ArgumentException: 'Duplicate Controller with DuplicateControllerName:NopAjaxCartShoppingCart is already added'". Here

Is there a robust way to register dependencies in ASP.NET Core 3.1 beside adding everything into Startup class?

大城市里の小女人 提交于 2021-01-18 03:53:38
问题 I have an ASP.NET Core 3.1 project. Typically, I register any dependency using the ConfigureServices() method in the Startup.cs class. But, I find myself having to register lots of dependencies and the ConfigureServices() looks huge! I know I can probably create an extension method of a static method and call it from the ConfigureService()` class, but wondering if there is a better way. If there a way to register dependencies in the IoC container without having to define them one at a time

Is there a robust way to register dependencies in ASP.NET Core 3.1 beside adding everything into Startup class?

这一生的挚爱 提交于 2021-01-18 03:52:19
问题 I have an ASP.NET Core 3.1 project. Typically, I register any dependency using the ConfigureServices() method in the Startup.cs class. But, I find myself having to register lots of dependencies and the ConfigureServices() looks huge! I know I can probably create an extension method of a static method and call it from the ConfigureService()` class, but wondering if there is a better way. If there a way to register dependencies in the IoC container without having to define them one at a time

asp.net core 3 rotativa startup.cs env problem

百般思念 提交于 2021-01-06 07:21:09
问题 Im try to use Rotativa ım follow this guide in start.cs in configure function ım add this code RotativaConfiguration.Setup(env); Severity Code Description Project File Line Suppression State Error CS1503 Argument 1: cannot convert from 'Microsoft.AspNetCore.Hosting.IWebHostEnvironment' to 'Microsoft.AspNetCore.Hosting.IHostingEnvironment' ım search this error and find this and convert my code like this RotativaConfiguration.Setup(env.WebRootPath, "Rotativa"); and its give me this error