Top "Asp.net-core" questions

ASP.

InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor'

I started to convert my asp.net core RC1 project to RC2 and faced with problem that now IHttpContextAccessordoes not …

.net dependency-injection asp.net-core
How to set json serializer settings in asp.net core 3?

json serializer settings for legacy asp.net core applications were set by adding AddMvc().AddJsonOptions(), but I don't use AddMvc() …

c# json asp.net-core .net-core asp.net-core-3.0
How to fix error "ANCM In-Process Handler Load Failure"?

I'm setting up the first site in IIS on Windows Server 2016 Standard. This is a NET Core 2.2 application. I cannot …

iis asp.net-core asp.net-core-2.2
Read appsettings json values in .NET Core Test Project

My Web application needs to read the Document DB keys from appsettings.json file. I have created a class with …

c# unit-testing asp.net-core appsettings
ASP.NET Core 3.0 not showing on Visual Studio 2019

I want to test the new Blazor server-side framework (aka Razor Components). I installed Visual Studio 2019 RC, and then the .…

asp.net-core .net-core visual-studio-2019 .net-core-3.0 asp.net-core-3.0
ASP.NET Core JWT mapping role claims to ClaimsIdentity

I want to protect ASP.NET Core Web API using JWT. Additionally, I would like to have an option of …

c# asp.net-core asp.net-core-webapi
Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing

I had an Asp.Net core 2.2 project. Recently, I changed the version from .net core 2.2 to .net core 3.0 Preview 8. After …

c# asp.net-mvc asp.net-core .net-core
Where did IMvcBuilder AddJsonOptions go in .Net Core 3.0?

I've just upgraded my ASP web API project from .Net core 2.0 to 3.0. I was using services.AddMvc() .AddJsonOptions(options =>…

c# asp.net asp.net-core json.net asp.net-core-3.0
How to get user Browser name ( user-agent ) in Asp.net Core?

Can you please let me know how to get the browser's name that the client is using in MVC 6, ASP.…

c# asp.net-core asp.net-core-mvc
Returning a 404 from an explicitly typed ASP.NET Core API controller (not IActionResult)

ASP.NET Core API controllers typically return explicit types (and do so by default if you create a new project), …

c# asp.net-core asp.net-core-mvc http-status-code-404 asp.net-core-webapi