Questions tagged [.net-6.0]
For questions about Microsoft's .NET application development framework that are specific to version 6.0+ of the framework. Use only If your question are version-specific
.net-6.0
2,549
questions with no upvoted or accepted answers
12
votes
0
answers
416
views
C# .NET 6 - simple SQL query to read one single (large) record takes forever when run is K8S pod, instantaneous when run in IIS
I have a simple table in SQL Server:
CREATE TABLE [dbo].[MyTable]
(
[Ticket] [uniqueidentifier] NOT NULL,
[UserID] [int] NOT NULL,
[Progress] [int] NOT NULL,
[Created] [datetime2](7) ...
10
votes
1
answer
10k
views
How can I use existing .net framework 4.8 class library in .NET 6 project?
We have .NET 6 Blazor Server-side project in Visual Studio 2022. We would like to use .Net Framework 4.8 class library in .NET 6. In this class library, we are using System.Windows.Form and we cannot ...
8
votes
0
answers
5k
views
.Net 6 docker build fails with "error NU1301: Unable to load the service index for source" when trying to access azure artifacts
Note that I am trying to build this locally with docker desktop and not in Azure CI/CD pipeline.
I have started this process using https://github.com/microsoft/artifacts-credprovider which also didn't ...
8
votes
0
answers
1k
views
How can I "stream" search results from a minimal API using IAsyncEnumerable in c# using .NET 6?
Overview
We're moving our database access to API calls and I need to return search results from a database as they're being found using that API. The plan was to use IAsyncEnumerable, but I'm having ...
8
votes
1
answer
3k
views
How to host blazor webassembly app with different base path
I have a Blazor Webassembly, .NET hosted application. On the server we host it on, the base path of the app will be mydomain.com/coolapp. Therefore, to try to get the app to render correctly on the ...
8
votes
1
answer
6k
views
Is it possible to use class library written in CORE 6 in another core 6 and/or NET 4.8 framework project
I have a class library using core 6.0
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>...
7
votes
0
answers
701
views
Mutex behaviour under Linux
I'm trying to control access via a multi-process console application, so that only one process can run a specific part of the code at a time.
Actually, I would have liked to use a mutex for this, but ...
7
votes
0
answers
3k
views
C# .NET 6 Serilog, How to log requests/responses using UseSerilogRequestLogging without sensitive data
I'm working on a .NET 6 API and I'm trying to log all user actions with Serilog.
I want to do it without having to add _logger.Info(...); in every endpoints for user requests and responses.
After ...
7
votes
1
answer
2k
views
How to use REST Api or CSOM in .NET 6 client app for Sharepoint on premise
In my SPA with ASP.NET Core backend, I want to create UI for uploading files that will be stored in Sharepoint 2016 hosted on premise.
I was just about to use C# CSOM, but it is only available for ....
7
votes
0
answers
3k
views
.Net 6.0 binary compatibility with earlier .Net Core versions
Couple of questions:
If i build an application for .Net 6.0, can it have dependencies on libraries (e.g. nuget packages) built for earlier runtimes? In particular, i m interested in .Net 5.0 and ....
7
votes
0
answers
2k
views
Visual Studio 2022 is not finding codegenerators for scaffolding
Rel: aspnet-codegenerator: No code generators available, Even after adding Microsoft.VisualStudio.Web.CodeGeneration.Design
I have the same issue as presented in the linked question but with Visual ...
7
votes
0
answers
8k
views
What replace the System.Web.UI Namespace in .NET 6
I need to use an HtmlTextWriter for writing an HTML file with HtmlContentBuilder in .NET 6
According to https://learn.microsoft.com/en-us/dotnet/api/system.web.ui?view=netframework-4.8 this namespace ...
6
votes
0
answers
480
views
Visual Studio 2022 Blazor error/bug with Tuple syntax, when using it with a Component callback parameter
I have a simple Blazor component called TagComponent, that receives 4 parameters, my problem is with the OnTagSelected parameter, which receives a Callback to be called from the TagComponent.
Code ...
6
votes
0
answers
3k
views
Getting "No signing credential is configured by the 'IdentityServer:Key' configuration section." error in ASP.NET Core Web API with IdentityServer
I am working on a backend project that I built using ASP.NET Core 3.1 Web API. All worked fine until I decided to migrate my project to .NET 6, I have updated all libraries accordingly to the new ...
6
votes
1
answer
1k
views
.NET 5/6 - What does UseSystemd() actually do?
I have a .NET API with a few Worker Services that I deploy on a CentOS 8 server. I know that there is a function in Microsoft.Extensions.Hosting package that is called UseSystemd(), which is supposed ...