Category "asp.net-core"

Sharing common database between .Net core and .Net standard Identity framework

I have old legacy MVC app that uses Identity 2.0. Also recently I have created .Net 6 API with Identity 6.0 (AspNetCore.Identity.EntityFrameworkCore). Note: The

Nuget Pack in Azure Pipelines: The method or operation is not implemented

I am trying to build a DotNetCore project and push the package to Azure Artifacts. The Azure-Pipelines.yml I have is the following: trigger: - master pool:

Populate IConfiguration for unit tests

.NET Core configuration allows so many options to add values (environment variables, json files, command line args). I just can't figure out and find an answer

How to forward/pass windows authentication from client to another REST API in an ASP.NET Core app with Angular?

I am currently implementing an ASP.NET Core app with Angular as described here. With the help I got in this question, I was already able to get the application

How to run 'dotnet dev-certs https --trust'?

I'm new in ASP.NET. Environment: Ubuntu 18.04 Visual Studio Code .NET SDK 2.2.105 I'm in trouble with some command running. I was reading tutorial at https

Can google openID be used in an intranet application?

Is it possible to use Google's OpenID API from an application that is being served in an intranet (accessed with a VPN but has access to the internet)? I assume

xunit test for IFormFile field in Asp.net Core

I have an Asp.net Core method with below definition. [HttpPost] public IActionResult Upload(IFormFile file) { if (file == null || file.Length == 0)

Run an ASP.NET Core project with Kestrel without Visual Studio

I've created an ASP.NET core 2.1 project in VS2017 and run it successfully from VS2017. The question is, What is the easiest way to run the above configuration

Change the headers of static files in Asp.net Core

I am using package Microsoft.AspNet.StaticFiles and configuring it in Startup.cs as app.UseStaticFiles(). How can I change the headers of the delivered files ?

Simple way to add extra parameter to Automapper ForMember

So, I have a mapping ObjectFrom to ObjectTo. ' All mappings can be done ObjectFrom.propX -> ObjectTo.propX2. But there is also a property in ObjectTo that ne

scaffold-DbContext , command results in exception: System.Reflection.TargetInvocationException

When attempted to run a scaffold command I am now receieving the exception noted below. It may be important to note that this stopped working all of a sudden. C

statusText always shows OK for StatusCode 401 where as expecting "Unauthorized" for 401

I dont understand why do I always see statusText as OK for StatusCode 401, whereas expecting "Unauthorized" for 401. Below is my code snippit. Please help me to

Entity type ‘Business_attrib2object’ has composite primary key defined with data annotations. To set composite primary key, use fluent API

I set composite primary key using fluent API, it is still an error, when I'm trying to create ClassesController (MVC Controller with Views Using Entity Framewor

Publishing and hosting Web API developed in .net core through IIS

I have WEB API developed in .net core (VS 2017). I need to deploy this api in IIS. This is the procedure I have followed. Open VS 2017, open the project -> r

FluentValidation inside a MediatR pipeline and Razor Pages

I'm working on a project where everything is done through a mediatR pipeline. To make things easy the pipeline is this : -> Validation -> Handler The Vali

Entity Framework Core multiple connection strings on same DBContext?

I have an Asp.Net Core app with Entity Framework Core that I initialize as follows: services.AddDbContext<ApplicationDbContext>(options => o

HTTP Error 500.30 - ASP.NET Core 5 app failed to start

I deploy a .NET Core 5 app with settings: And the website shows an error: HTTP Error 500.30 - ASP.NET Core app failed to start Common solutions to this issue:

Docker build multiplatform asp.net core 5.0 app on armV7 with github action

I have a problem and I can't find a solution... I try to build docker image in a pipline with docker actions. My docker image build an ASP.NET core 5.0 app. All

Ocelot gateway support multiple claims in RouteClaimsRequirement

At the moment our config on .net core looks like this "RouteClaimsRequirement": { "Claim": "settings_read" }, Is it possible to add more claims like below. "Rou

Is it possible to inject a specific configuration class bound as a suboption and not to IConfiguration<MyType>?

I have a class that I want injected into some controllers. It has a few dependencies that I want to be automatically injected. Specifically this class requires