asp.net-core-3.1 Questions

2

Solved

I'm going to return a bad request result in my action filter. I have two choices: context.result = new BadRequestResult(); or context.result = new BadRequestObjectResult(); It seems there are coupl...
Maillot asked 9/7, 2020 at 15:8

5

Solved

I am building a simple Asp.Net Core app in linux(pop os). I am using VueJs + Aps.Net Core 3.1.101 I am trying to do a POST call to my app and my model is like below: public class AddConfigurationC...
Unclassical asked 8/2, 2020 at 20:38

6

I am using .NET Core 3.1 and want to create a GRPC Service with a Console App as the Server and a WPF App as the Client. I can't see any examples online - for some reason all the Console Apps seem ...
Constrained asked 29/9, 2020 at 16:1

2

I want to map datetime in c# datetime in protobuf . Do you have any suggestion to do this?
Islas asked 15/9, 2020 at 9:55

7

Solved

I receive the following error. InvalidOperationException: Can't use schemaId "$Registration" for type "$PortalService.Models.Registration". The same schemaId is already used for...
Interrupted asked 19/5, 2020 at 1:30

5

Solved

I have an API controller for performing autosaves on an application I am developing. It uses the same viewmodel as the view, which has a number of required fields. The autosave controller may need ...
Cowden asked 30/7, 2020 at 20:39

10

Solved

I just upgraded my visual studio 2019 to latest version 16.8.3 and suddenly I am not able to load any C# project and getting the following error for all .NET core projects: The project file cannot...

1

I have a .Net Core 3.1 application with an SQL database. I use lazy-loading proxies to automatically retrieve data from related tables. Basically, I have a table, which references some other entiti...

4

Solved

Let's say I have a simple controller with one POST method that accepts an object from its body. However, the presence of this object should be optional in the HTTP request body. I tried to implemen...
Entomologize asked 23/4, 2020 at 12:25

7

Solved

I have an ASP.NET Core 3.1 C# razor pages application that also uses some Blazor-serverside razor components. I have published it to IIS on Windows 2008 R2 Server. But when browsing the site in Chr...

2

I am trying to follow this tutorial, which asks me to Add Client-Side Library, but I simply don't have that option available: . VS version: Microsoft Visual Studio Community 2019, Version 16.6.1 ...
Snapdragon asked 2/6, 2020 at 17:38

3

Solved

After upgrading a project from ASP.NET Core 3.0 to ASP.NET Core 3.1, my application stopped working on Azure App Services—but only when published using continuous deployment from Azure DevOps Pipel...

3

Solved

I have the following Identity Server 4 configuration on ASP.NET Core 3.1 projects: services .AddIdentityServer(y => { y.Events.RaiseErrorEvents = true; y.Events.RaiseInformationEvents = true;...
Guizot asked 26/8, 2020 at 21:56

3

I'm building an application with an SQL database, with the following CRUD operations: public Foo Add(Foo foo) { _dbContext.Foos.Add(foo); _dbContext.SaveChanges(); return foo; } public Foo Dele...

3

When I tried installing Microsoft.AspNetCore.AppRef in my webapplication in .net core 3.1. However, I get this error instead: Package 'Microsoft.AspNetCore.App.Ref 3.1.3' has a package type 'Dotnet...
Bebebebeerine asked 13/9, 2020 at 15:47

5

I am getting error "Error HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported" after adding <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> <AspNet...
Builder asked 23/5, 2020 at 0:15

1

I do have an existing rest API project developed using asp.net core 3.1. At present, we are planning to do code refactoring and optimize it. I came across BenchMarkDotNet recently. All the example...
Nocturn asked 27/9, 2022 at 13:38

2

Solved

It seems .NET Core 3.1 makes it very difficult to access the raw HTTP request body following an exception The core of the issue seems to be you can't rewind the stream to the beginning so the whol...
Mata asked 12/4, 2020 at 17:29

2

Solved

In Razor syntax, to disable the layout for a specific page we can do this: @{ Layout = null } In Blazor, the convention for it is defined by @layout. However, I cannot see how we can set it a...
Chenault asked 29/12, 2019 at 11:30

1

What methods are available for debugging routing issues in ASP.NET Core 3.1 Web API? Specifically, the infamous 404. I've seen tons of questions regarding this in a Web API but they all deal with...
Sturgill asked 24/12, 2019 at 14:17

8

I have just upgraded from .NET Core 2.2 to 3.1. I have tests to confirm that extension methods I've added to HttpContext.Request are working. I was previously able to do things like: var context ...
Kurman asked 28/2, 2020 at 4:1

3

I have two asp.net core console apps. First one has appsettings json files as shown below. As you can see they are nicely nested. The second core project is also console project. I have added apps...
Smaragdite asked 22/1, 2021 at 13:36

3

Solved

I have Asp.net Core 3.1 API project. When I build it doesn't create any web.config file, but when I publish the API using VS 2019 in a folder, it creates a web.config file. So why it's not creating...

4

I have been running multiple unit tests in multiple solutions for years. Now, out of seemingly nowhere, every time I try to run a unit test, I get this message in the Tests Output pane: Microsoft....
Tori asked 16/11, 2021 at 18:39

1

Solved

I have 2 different project. I created web apis project in ASP.NET CORE 3.1 (MVC). Another I created ASP.NET webforms website (.NET Framework 4.8). I am unbale to call .NET Core web apis from webfor...
Humo asked 8/3, 2023 at 12:13

© 2022 - 2024 — McMap. All rights reserved.