asp.net-core-6.0 Questions
1
Solved
While upgrading to OData 8, could not find a way to fetch key from the URI for navigation property.
I'm using preview package of Asp.Versioning.OData and following this guide from Microsoft to fetc...
Isotone asked 31/5, 2022 at 22:18
1
I'm coding a website with ASP.NET Core 6. It's originally a tutorial from YouTube with .NET Core 3. So I'm facing migration issues.
Here, I have a DbInitializer file which contains all my dat...
Compressive asked 31/5, 2022 at 11:59
2
Solved
How does one get user data (user name and surname, and user groups) from company's Active Directory (WinServer) in dotnet core 6?
I have Identity package installed, but the app needs to work with W...
Fortyniner asked 12/3, 2022 at 10:22
3
I updated yesterday from .Net 5 to .Net 6 and now my projects can't start with dotnet run. I then get the error:
Building...
warn: Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer[5]
The ASP...
Manzano asked 10/11, 2021 at 16:11
1
Solved
I have a VS2022 asp.net core 6 web app that has invalid html tag attribute (b-g6ltozs93r) in many of the _Layout.cshtml tags when run. Here is an example from an untouched project. This doesn't occ...
Bettinabettine asked 11/5, 2022 at 23:36
1
Solved
Unfortunately, advices for previous versions didn't work
How to add global route prefix in asp.net core 3?
app.UsePathBase(new PathString("/api"));
nor this one
public static class...
Mclain asked 4/5, 2022 at 11:25
1
Solved
My apologies for the silly question, but I don't see a good example of how can I specify a specific format for DateTime in JSON serialization for .net core 6.
The old way, net core 3.
// in the Con...
Atilt asked 29/4, 2022 at 15:52
1
Solved
I'm using ASP.NET Core 6. I'm trying to add a blazor project to an existing monorepo that includes a web API server project. I ran dotnet new blazorwasm --hosted, and the generated server project i...
Devol asked 25/4, 2022 at 4:51
3
Solved
I'm upgrading an ASP.NET Core API project from v5 to v6.
Service config in v5:
services.AddSwaggerGen();
Service config in v6:
builder.Services.AddEndpointsApiExplorer(); // what is this?
builder....
Rebus asked 20/4, 2022 at 1:4
1
Solved
I'm upgrading a system from ASP.NET Core 5 to 6. I've read the migration guide for the new "minimal hosting model".
The docs say the new way is preferred and recommended, but the old way ...
Mejias asked 16/4, 2022 at 15:55
1
Solved
THIS IS .NET 5
I use IDbInitializer dbInitializer in public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IDbInitializer dbInitializer) now in .NET 6 i cant do this job.
public ...
Jovian asked 28/3, 2022 at 17:34
1
I'm trying to setup a web api using ASP.Net Core 6 so that users can hit my end points and then I do some work in Teams using a privileged account. I don't think I am wiring up the DI part correctl...
Gastrectomy asked 21/3, 2022 at 14:48
1
Solved
In .NET Core 3.1 and .NET 5, we had an Xunit test like the example below. It makes sure every Controller has an AuthorizeAttribute to prevent security leaks.
When upgrading our web project to ASP.N...
Goble asked 7/2, 2022 at 22:52
1
Solved
I am creating an Area using Scaffolding for my project. As there is no startup.cs file is ASP.NET 6, I suppose I have to add it in the program.cs file. What is the right way to do that and is it an...
Knotgrass asked 30/1, 2022 at 15:11
1
Solved
I'm trying to figure out how to setup a login via Discord Oauth2 while using Dapper as my ORM.
Microsoft has a guide here that I have followed to setup all of my stores. I infact can call CreateAsy...
Utricle asked 20/1, 2022 at 22:54
1
Solved
I migrate an ASP.NET Core project from 3.1 to 6.0.
I have copied old migration and pasted it to our new version
Migration on EF Core 3.1 (old)
migrationBuilder.AddColumn<DateTime>(
name: &qu...
Castellatus asked 9/1, 2022 at 17:39
3
Solved
There is no Startup.cs in the web/api application any more.
We used to be able to inject IConfiguration into that Startup class.
public class Startup
{
public Startup(IConfiguration configuration)...
Graiggrail asked 21/12, 2021 at 3:36
4
Solved
In an earlier question of mine I asked how to populate an existing object using System.Text.Json.
One of the great answers showed a solution parsing the json string with JsonDocument and enumerate ...
Anzus asked 1/12, 2021 at 19:18
4
Solved
Based on today's announcement of the ASP.NET Core 6 release, it is my understanding that .NET 6 will be immediately available ("day 0 support") on Azure App Services via Early Access:
We...
Rote asked 9/11, 2021 at 0:30
2
Solved
When using the new template for ASP.NET Core 6.0, which includes var builder = WebApplication.CreateBuilder(args); the DeveloperExceptionPageMiddleware is automatically added. I would like to not u...
Ulrika asked 15/11, 2021 at 23:14
1
Solved
I am migrating a WebApi from .net5 to .net6. It's going fairly well, but have run into the problem of how to configure Kestrel during startup. The following code is from the Main method of the Prog...
Ammoniac asked 9/11, 2021 at 19:52
1
Solved
Even when I say return 204 (NoContent), it returns 200. Why?
app.MapGet("/api/alive", (context) => Task.FromResult(new StatusCodeResult(204)));
Status code in browser is 200
Marmara asked 17/9, 2021 at 7:31
© 2022 - 2024 — McMap. All rights reserved.