All Questions
263
questions
0
votes
0
answers
26
views
Any pitfalls in upgrading a WPF application from .Net 6 to .Net 8?
We're looking to upgrade some large WPF solutions from .Net 6 to 8, and my understanding is that the process should be straightforward (changing the projects' target framework). But are there any ...
0
votes
0
answers
15
views
How do I creat a dot net project template when when used within VS 2022 creates the project under a specific directory structure under the solution?
I want to create a .NET project template when it is used within Visual Studio 2022 to create a solution and project at the same time.
My solution will be in the root folder. I want the project to be ...
-1
votes
2
answers
51
views
.NET 8 Rate Limiting via Policy
I am trying to run the .NET 8 Rate Limiting Middleware, with a global rate limit, as well as a specific policy for certain endpoints. The global policy is working as expected, but I cannot get the ...
0
votes
1
answer
32
views
Is it possible to fail a build if .NET 8 project references a Windows specific library?
I migrated a large code base to .NET8 that was previously running on Windows. Now it has to run on Linux. I would like for build process to fail if there is an Windows specific library that will not ...
0
votes
1
answer
45
views
How to hide server details(Kestrel) in response headers for Function Hosted applications in .NET8?
I'm working on an Azure Function Hosted application and I need to hide the server details from the response headers. I tried the following code, but it didn't work:
.ConfigureWebHostDefaults(...
0
votes
0
answers
38
views
Trouble getting object claims using System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler in C#
This may be important to note before reading: All this used to work before, using System.IdentityModel.Tokens.Jwt version 6.15.1. After bumping the solution from .net 6.0 to 8.0 and updating that ...
0
votes
1
answer
33
views
Why my ASP.NET razor page app cannot access a specific endpoint?
I have an issue with my ASP.NET app where it cannot access a specific endpoint. It throws a 502 error in Azure and a request timed out on my local machine. The endpoint I want to access is the ...
1
vote
1
answer
54
views
C# .NET 8 console app works in one environment but not another
I have just upgraded a .NET framework console app to .NET 8. It works perfectly both in VS 2022, as well as on my local machine after publishing.
However, when I copy the files over to our server (...
0
votes
2
answers
62
views
ASP.NET Core 8 : singleton pattern with HttpContextAccessor does not work together
I'm developing an ASP.NET Core 8 application and using the singleton pattern for session management, but when I want to read the values, it displays null values!
Here you can see the code:
...
0
votes
0
answers
42
views
Can i run .Net 8 runtime on CentOS?
I want to deploy a .net core app with .net 8 on a linux VPS that is running CentOS V7.9. I can't find any way to install .net 8 runtime.
Is there any other way of hosting a .net 8 app on that kind of ...
0
votes
2
answers
59
views
How to create custom parameter attribute FromActionArguments in C# like FromQuery?
I would like to create attribute that will tell that parameter should be filled from action arguments, not from query, route, header or body.
ASP.NET is already binding it correctly from ...
-1
votes
0
answers
130
views
How to Target Both .NET Framework 4.8 and .NET 8.0 in a Single Project?
I have a project currently targeting .NET Framework 4.8, and I want to extend its compatibility to also target .NET 8.0. Is there a way to set up my project so that it can be built and run on both ...
1
vote
2
answers
124
views
Dictionary is having duplicate keys
Can a Dictionary have duplicate keys? Or is there something else, I am missing?
Here is the code
Dictionary initialization is at class level.
StoredPoints.Keys
Count = 4
[0]: "SN6J1701_B"
[...
0
votes
1
answer
56
views
Issue with FrozenSet Preserving Order in Asynchronous Data Retrieval Method using .NET 8
I am currently facing an issue with the FrozenSet in C# with .NET 8 Web API where it appears to be managing the order of data unexpectedly. Below is the method where I am encountering this behavior:
...
0
votes
0
answers
45
views
Alternative For Type.IsSerializable
We used in an application
if (!value!.GetType().IsSerializable)
return;
In the meantime the IsSerializable property is obsolete (Formatter-based serialization is obsolete and should not be used.)....