Category "asp.net-core"

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

How to set ASPNETCORE_ENVIRONMENT to be considered for publishing an ASP.NET Core application

When I publish my ASP.NET Core web application to my local file system, it always takes the production-config and the ASPNETCORE_ENVIRONMENT variable with the v

Visual Studio .net core tag helpers not working

Well, lets get down to it. I'm using Visual Studio 2015 and ASP.NET core tag helpers have completely stopped working, no idea why as I've not changed anything.

How to implement Windows Authentication with IdentityServer 4

How to correctly implement Windows Authentication with Identity Server 4? Are there any samples to do that? I looked at the source code of IdentityServer 4, and

Error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

I'm trying to upgrade the following template project to ASP.NET Core 1.1: https://github.com/wilanbigay/aspnet-core-aurelia-typescript-starter After running do

DataTables warning, Requested unknown parameter 'CustomerID' for row 0, column 0

I'm trying to implement datatables to my MVC ASP.NET Core with MySql project so i followed a step-by-step tutorial but i can't fix this error: " DataTables warn

ASP.NET Core Dependency Injection error: Unable to resolve service for type while attempting to activate

I created an .NET Core MVC application and use Dependency Injection and Repository Pattern to inject a repository to my controller. However, I am getting an err

How to use C# and Google.Cloud.Dialogflow.Cx.V3 to generate valid Google DialogFlow CX webhook response JSON

I've created a webhook using C# and ASP.NET Core in order to try to generate the webhook response to DialogFlow, but I'm really struggling with using Google.Clo

How to publish external Angular folder with my asp.net core project?

I have created an Asp net core api with an external angular project, the app works well in debug mode and I want to publish the two apps in same folder, but the

How can i save a file that i create into a path

I´m developing a school project where i need to export a html table into a csv file, and when i click in a button i need to save that file into a path lik

Swagger is not generating swagger.json

I have the asp.net core MVC project and separate WebApi project in one solution. I'm adding the swagger following the documentation on github. Here is my Startu

ASP.NET Core 5 returning JSON adding $id and $values properties

I'm using ASP.NET Core 5. As below, I'm using System.Text.Json: public IActionResult Index() { var result = GetAllMenuItems(); return Ok(result); } The