1,623,903 questions
0
votes
0
answers
26
views
Regex - basic string replacement
I have a string which may or may not contain a code for an emote, all of which begin the same: "auroraa1"
Such as:
"auroraa1Smile", "auroraa1Bye", "auroraa1Love&...
1
vote
0
answers
23
views
C# MsgReader - Modified time must be zero for streams
I've been searching all over the internet for a solution; hope someone can help. I am using MsgReader to extract information from .MSG files. Recently, I have been getting an error
Modified time ...
-3
votes
0
answers
14
views
forceChangePasswordNextSignIn in Azure B2C does not work [closed]
I am using Azure B2C with Custom Policies. When I use graph api and set forceChangePasswordNextSignIn true I see error "Password has expired" instead of password change screen. This is the ...
1
vote
0
answers
32
views
How to make composition ColorShadow control circular?
I am using the ColorShadow control from the CompositionProToolkit in a WinUI/UWP project. I ported it to WinUI by replacing namespaces and Window.Current... with CompositionTarget....
1
vote
1
answer
47
views
.NET 10.0 integration tests error with xunit v3 assembly fixture and WebApplicationFactory
When setting up an integration test with the .NET 10.0 SDK and the new xunit v3, I get the following error when trying to customize the WebApplicationFactory:
System.InvalidOperationException: The ...
1
vote
2
answers
84
views
Using overload and virtual correctly
I have two classes: UNumber and Number (which inherits from UNumber).
Both use the same addition, although Number also looks at the sign of the Numbers.
I want that the addition of Number gets used if ...
1
vote
0
answers
24
views
How to Configure Azure AD and Azure AD B2C Together as JWT Authentication Providers in ASP.NET Core?
I am trying to configure dual JWT authentication in my ASP.NET Core Web API.
My API should accept tokens from:
Azure AD B2C
Azure AD (Entra ID)
I use a PolicyScheme (DualAuth) to auto-detect which ...
Advice
0
votes
1
replies
39
views
Need to call ConfigureAwait for tasks only once or after all awaits?
Do I have to call ConfigureAwait for every await or only when I created a new task?
async Task Foo()
=> await Task.Wait(1).ConfigureAwait(false)
async Bar()
=> await Foo()....
Best practices
0
votes
2
replies
33
views
Representing 4 types of Card Templates Adhering to DDD
I have an Entity Called CardTemplate. For physical cards, there will have to be a pattern chosen to physically print the card. And based on the two types of operations that the cards are allowed to do,...
0
votes
2
answers
61
views
Entity Framework Core: how to get the list of attribute codes for each item?
I am writing a Web API endpoint, data comes from SQL Server, and I'm using EF Core 8.0.
I have a table of products and another table that maps the product codes to product attributes (one-to-many) ...
1
vote
0
answers
38
views
ComponentSpace - SSO - ISamlServiceProvider.SamlState is empty during GetLocalSPConfiguration Intermittently
I have recently added Component Space to my .NET 9.0 based web application, to facilitate SSO.
It worked fine for few days, then I faced an issue, where the 'configurationName' is becoming empty for ...
-2
votes
0
answers
96
views
.NET different descriptions for system.type class? [closed]
I found these two links to a description of System.Type:
.NET Standard 1.6
.NET 10
These descriptions list different members. For example:
The .NET Standard version has a Name property, but the ....
-1
votes
0
answers
33
views
Swagger not showing v2 data in UI with no way of changing [closed]
I'm implementing some versioning in my Minimal API for .NET 8 and I've hit a bit of a snag.
My documentation won't load the v2 API doc into Swagger when I run the application.
I have this Swagger ...
1
vote
2
answers
331
views
Why does calling Thread.Sleep in a loop takes 6 seconds instead of 5? [duplicate]
I implemented this simple loop in C# which runs a 100 times, and in each iteration waits for 50ms.
using System.Diagnostics;
var sw = Stopwatch.StartNew();
for (int i = 0; i < 100; i++)
{
...
0
votes
1
answer
46
views
Json Serialization - Work around for ExpandableObjectConverter [duplicate]
I'm writing code for .NET 8.
Given this class Sample:
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
[DataContract]
public class Sample
{
[DataMember]
public int SampleId {...