340,756 questions
0
votes
0
answers
57
views
How can I setup a Wi-Fi hotspot in a .NET framework application?
I want to be able to bring up and takedown a Wi-Fi hotspot in Windows 11 from a .NET framework application.
I know it's possible to use the loopback adapter (and some powershell script), but we want ...
0
votes
1
answer
126
views
Deserializing array of objects to concrete .NET types using Newtonsoft
I have a couple of classes (simplified):
internal class OrderItem
{
public string Name { get; set; }
public Order Order { get; set; }
}
internal class Order
{
public IReadOnlyList<...
2
votes
0
answers
139
views
C# .net cannot run in VS code
I use VS code (not VS cause i have linux) and have been trying to run my c# template from run and debug in VS code but it does not works and returns this error in output.
-----------------------------...
Best practices
0
votes
0
replies
62
views
.NET Messaging CDC - Monitoring
I have a question about messaging in our system. We have three services: Order, Cart, and Monitoring. We usually work with communication in such a way that each project has its own contracts, and ...
Best practices
1
vote
3
replies
65
views
.NET - Messaging - Where to place shared contracts
I have a question about sharing contracts between services using a message broker (more specifically, Azure Service Bus). I searched for it in various articles and asked a chatbot, but I didn't get a ...
0
votes
1
answer
164
views
How to set window position on different monitor from main window
It's no problem to set the position of the new WinForm inside the monitor where the main window is displayed. For example:
Form1 form = new Form1();
form.Show();
form.StartPosition = FormStartPosition....
0
votes
0
answers
30
views
Revoking Connected Devices: How to Invalidate IMemoryCache Immediately to Prevent 2-Minute Access Window?
Hey i was building a DeviceService to know Connected Devices to an account after i builded every thing now i got issue with revoking device
Main Confusion :
that i decided to use IMemoryCache to ...
1
vote
1
answer
32
views
How to set up appsettings.json for feature flags using Microsoft Feature Management
Microsoft's feature management documentation implies that the correct format for config for feature management is the following:
{
"feature_management": {
"feature_flags&...
2
votes
1
answer
87
views
Replace strings in files when using a .NET item template
I am creating my first template for a .NET solution. For the most part it works, but I have a string "MyService" at some places in the Program.cs that I would like to replace with "...
4
votes
1
answer
92
views
Deserialization of XML with multiple namespaces
I'm attempting to deserialize an XML response from an API. The data is as follows (I have only included a small chunk for the sake of a small post):
<ns1:alerts xmlns:ns1="http://gov.fema....
1
vote
2
answers
87
views
Problem with Content-Type in a (.net) StringContent
I have a request (going to an APIM endpoint.) From Postman the test runs just fine, but from my code it fails with a 400. I looked at the requests in fiddler and the only difference is this:
// This ...
Best practices
3
votes
3
replies
87
views
C# CancellationToken across chain of api calls
I have the following application architecture:
FrontEnd → ApiServer 1 → ApiServer 2 → Database
So, the frontend calls a web server, which calls multiple API which make query on database.
What is the ...
-1
votes
0
answers
87
views
How to detect the current user session in Intune deployment?
I have a C# installer app that needs to identify which user session to target. The application fails to identify the correct user when deployed via Microsoft Intune.
For example, when deployed via ...
0
votes
1
answer
208
views
What’s the most efficient way to map large entity models to DTOs in ASP.NET Core without using AutoMapper? [closed]
I'm working on a high-performance ASP.NET Core Web API where each request can return hundreds of entity records. Each entity includes multiple navigation properties and nested objects.
Currently, I’m ...
1
vote
1
answer
69
views
asp.net tilde ~ paths not resolving on pages with a master page
I have a page Product.aspx that has a master page Main.master, both pages are in the root of the project (they don't belong to any folder). The problem is that the tilde path only works for the Main....
0
votes
1
answer
69
views
Blazor auto render mode prerender flicker problem even though pages use persistence
There are two pages in my app:
Page1.razor (home) and Page2.razor. There is no problem rendering first page. But when I navigate to second page, there is flicker problem. I put 1000 ms sleep to better ...
-1
votes
0
answers
84
views
How does the CLR implement static fields in generic types? [duplicate]
This question has been bouncing around my head for a few years and I wanted to finally ask it.
The question is: how does the CLR implement static fields in generic types? Under the hood, where are ...
2
votes
1
answer
55
views
What is the best way to check the file size in S3 multipart upload?
I would like to set a file size limit in uploads through multipart upload in my application, but my problem is, using pre-signed-url, I can't check the file size of each part and all the options I ...
1
vote
0
answers
68
views
System.Net.WebSockets is missing messages/notifications
I am creating a lib to listen to server notifications (more than 100,000 requests per hour), when using WebSocketSharp it is receiving all 100,000 notifications but there is memory leak (server goes ...
4
votes
0
answers
212
views
`dotnet test` is inconsistent when it comes to showing the total number of unit tests at the end
I have a solution with many projects. When I run dotnet test, it selects all my xUnit projects and seems to correctly execute all of them. But at the last line of what dotnet test prints, the number ...
0
votes
0
answers
27
views
Writing FDSK via Falcon SDK
I am developing an application based on .NET Framework 4.8 and using the Falcon library version 6.1.6264.
I have also tested the same functionality with .NET 6, .NET 7, and .NET 8 using the latest ...
2
votes
2
answers
130
views
Getting syntax highlighting on string argument
I am currently creating a custom .NET router.
It is working as it should, but one thing that bothers me is that I don't get the same level of syntax highlight in rider as I get with other more ...
1
vote
1
answer
84
views
Callback methods with ProtoBeforeSerialization/ProtoAfterDeserialization donot work in protobuf-net 3.2.26, even when assigned explicitly to MetaType
I'm upgrading from protobuf-net 2.2.1.0 to 3.2.26, and I've noticed that callback methods decorated with [ProtoBeforeSerialization] and [ProtoAfterDeserialization] are no longer invoked during ...
0
votes
0
answers
91
views
Laravel Queue Process Slow
I hope you’re all doing well. I’m reaching out because I’m facing an issue with my setup. I have a .NET application and a Laravel system integrated via API. The .NET application sends payloads to the ...
1
vote
1
answer
50
views
Why does MSBuild apparently ignore CopyToOutputDirectory when specified in Directory.Build.props?
When you add an appsettings.json file to a project, the following is inserted in its .csproj file:
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>...