340,756 questions
1
vote
0
answers
56
views
Dockerizing ASP.NET MVC application on .NET 4.5.2 - 404 from ManagedPipelineHandler on hitting an action method
I am trying to dockerize an existing ASP.NET MVC application running on .NET 4.5.2. I am using mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 as the base image (the base ...
3
votes
2
answers
208
views
How to log "who did what" without adding userId in every method?
I'm implementing a DDD app where my entities emit DomainEvents for auditing purposes. Every action that occurs in my board should log something to the DB. In the example bellow, I'm logging that ...
3
votes
0
answers
145
views
C# service doesn't run on Windows Server, but runs on Windows 10
I'm trying to build a background service with autostart in the background.
Core logic in console app executing from OnStart, however after several failures at debugging root cause - modified code by ...
4
votes
2
answers
101
views
Why does dotnet restore on a .sln ignore `DownloadContentFiles` tasks in .csproj projects?
I have an .sln referencing a single .csproj. Inside the .csproj I download static dependencies into ASP.NET's wwwroot:
<Target Name="DownloadContentFiles" BeforeTargets="Restore&...
2
votes
0
answers
82
views
VS Setup Project Change to Non-advertised Shortcut
I have a Visual Studio 2022 installer project I made and it currently has a primary output which creates an advertised shortcut automatically when the project is installed. However, since its ...
3
votes
0
answers
92
views
How to synchronize blob names stored in the database with the actual blobs in Azure Blob Storage
Current problem: when we store files in Azure Blob Storage, we create a folder per entity (company/user).
The name of the folder includes:
Entity ID (required to guarantee that the folder name will ...
0
votes
0
answers
64
views
How to bind to a listbox item's automation ID?
I have a listbox defined as follows:
<ListBox Name="MyListBox"
AutomationProperties.AutomationId="MyWindow_MyListBox"
ItemsSource="{Binding MyItems}"
...
0
votes
0
answers
61
views
Force explicit BLE disconnect with Windows.Devices.Bluetooth BluetoothLEDevice
I am using the C# Windows.Devices.Bluetooth APIs to communicate with a device via BLE.
The BluetoothLEDevice class does not expose connect or disconnect methods but at least the connect can be forced ...
0
votes
2
answers
97
views
Is there a way to make AddUserSecrets take precedence over Configuration.AddAzureKeyVault?
For the life of me I cannot find much official information on the load order or precedence of configuration file load order.
I have a situation where I am provided configuration via AddAzureKeyVault ...
0
votes
1
answer
54
views
Mono: can't access API with self-signed certificate - MonoBtlsException: Ssl error:1000007d:SSL
I have a Mono container (mono:6.12.0.182) and it has some host.testcontainers.internal:[PORT] exposed to it.
I will be using this to integration test a legacy .NET client application against a new API(...
2
votes
3
answers
2k
views
Supports 16kb memory page size issue in .Net MAUI
On Play Console in App bundle detail I get this:
Does not support 16 KB
Hide detail
Learn more
Libraries that do not support 16 KB:
base/lib/arm64-v8a/libHarfBuzzSharp.so
base/lib/arm64-v8a/...
1
vote
2
answers
96
views
Throw build time-error if a class library was referenced, but custom targets was not imported
I have a class library project (C#) that contains a custom build logic in the custom .target file. To properly consume this class library, it is mandatory for a consuming project to include not only ...
0
votes
1
answer
34
views
.NET Framework 4.5 in Azure Web App and FederatedAuthentication.SessionAuthenticationModule.WriteSessionTokenToCookie
I am trying to migrate a .NET Framework 4.5 application from on-premises IIS hosting into Azure Web App
However, when I deploy the same code / config, I face issue with below code
...
1
vote
1
answer
153
views
Why is CancellationToken.None generating CS0426 The type name 'CancellationToken' does not exist in the type 'None'
Why does this code result in a compiler error:
await Parallel.ForEachAsync(files, loopOptions, async (file, CancellationToken.None) =>
but this code snippet does not?
var x = CancellationToken....
1
vote
1
answer
67
views
handling versions of Microsoft.Extensions references in .NET multi target framework packages
I am writing a bunch of multiframework target NuGet packages for .NET.
Most of them have dependencies to the typical Microsoft.Extensions NuGet packages.
<Project Sdk="Microsoft.NET.Sdk"...
1
vote
0
answers
67
views
Set Aspire custom container network to bridge
When I created a container using AddContainer it has a default network that is specific to this container, but I want to it have only one network -- bridge. How can I do it?
something like --network ...
1
vote
2
answers
104
views
Selenium Edge add network capabilities in .Net
I want to get access to the Network in Dev Tools, while using the Edge webdriver.
I'm using Selenium 4.35.0
This is what I got so far:
Import-Module -Name "Path to module"
$Options1= [OpenQA....
2
votes
0
answers
58
views
C# and VB: How to enable specific version dependency for a project auto generating a NuGet package
Recently, I've worked on upgrading all of the projects in our main application to SDK style projects. This was done in order to enable the feature to auto generate a NuGet package for each project on ...
1
vote
2
answers
254
views
How to dynamically create a C# class that inherits from a generic base class referencing itself (T : Base<T>)?
I am trying to dynamically generate a C# class T at runtime using Reflection.Emit (or other dynamic type creation techniques). The challenge is that the base class is a generic type U<T> that is ...
0
votes
0
answers
59
views
BindableProperty.CreateAttached() method raises Error on build
I'm pretty new to .NET
In .NET MAUI 9.0 I am creating an app based on a custom Layout extending the Grid class, which uses several BindingProperties that i have no issues with:
namespace krizanke_ux....
0
votes
1
answer
95
views
MatLab 2025a Error switching the .NET Framework Error using dotnetenv
The framework is already loaded immediately after restarting Matlab 2025a.
Error using dotnetenv
.NET is loaded. To change the environment, restart MATLAB then call dotnetenv.
Test code directly ...
0
votes
2
answers
269
views
Can the TextBox portion of a ComboBox be made resizeable on all sides?
Can the TextBox portion of a ComboBox be made resizeable on all sides?
I've done this with the TextBox (shown below). I thought the ComboBox was a composite control with a TextBox & ListBox, so I ...
0
votes
1
answer
56
views
How to resolve runtime assembly binding issue
I have some class libraries and to service projects that I am hosting as a service.
This is an old .net framework service and library.
The framework is 4.7.2 and I am utilizing Azure.Communication....
0
votes
0
answers
89
views
How does a .NET Controller know to apply the CancellationToken = default [duplicate]
EDIT 2 (please reinstate this question)
As (see below) the CancellationToken is NOT sent from caller to callee of an API, how does .NET C# know to apply the default= option of a Controller methods' ...
1
vote
1
answer
43
views
SerialPort Read() vs BaseStream.Read()
I'm currently reading the serial port via .BaseStream.Read(), but I noticed this in the documentation:
Because the SerialPort class buffers data, and the stream contained in the BaseStream property ...