Skip to main content

All Questions

Tagged with
0 votes
1 answer
21 views

Using Serilog to log at various levels of verbosity across namespaces and classes

I was led to believe that I can set a global minimum level of Information and then in particular namespaces or classes I could bump it up to Debug or even Verbose. This is the code: using Commons; ...
Mircea Ion's user avatar
0 votes
1 answer
72 views

How to loop through Inner list of object

I have a need where I need to loop through sublist of each class. public Class A { public int IdA {get;set;} public string Name {get;set;} public List<Class B> Items {get;set;} } public Class ...
Dev's user avatar
  • 25
0 votes
1 answer
30 views

How can I write a HotChocolate middleware that acts after UseFiltering?

I am building a GraphQL interface in an existing dotnet webapi using HotChocolate v13. I want to write a middleware in a field that has UseFiltering(), which as far as I know is a middleware as well. ...
Alberto Cruz's user avatar
0 votes
1 answer
69 views

Is there a way to make a Blazor website fully work offline?

We have a Blazor website made, but the client needs it to work offline. I need to load all the data necessary when there is internet connection so that i can later use it in the pages. Not just ...
João Rodrigues's user avatar
2 votes
2 answers
58 views

How to Refresh IConfiguration

I am using .Net 8 DI to load IConfiguration on startup. It will be loading key-values from azure keyvault. But, after few hours the key-values would change. So how to refresh IConfiguration ...
Jck's user avatar
  • 21
0 votes
0 answers
42 views

.net running on kestrel cannot start BackgroundService in staging/production environment

I have created a QueuedHostedService extending BackgroundService following official docs here. This runs just fine on development mode and I am able to step into/debug the task passed to the ...
Aakash Verma's user avatar
  • 3,944
0 votes
0 answers
34 views

.NET 8 Angular and ASP.Net Core proxy config

I am working with the ASP.Net Core and Angular first time, so maybe the problem is easy to solve but I have not found a solution yet. When the solution is create with the default visual studio ...
julianuslemurrex's user avatar
0 votes
0 answers
14 views

Using AzureB2C Invite flow prevents EnableTokenAcquisitionToCallDownstreamApi from working. Can I use two custom policies?

I'm trying to work with AzureB2C's invite flow from their samples (https://github.com/azure-ad-b2c/samples/tree/master/policies/invite) I have setup the two custom policies B2C_1A_InvitePolicy ...
Tomas McGuinness's user avatar
1 vote
4 answers
104 views

How to ensure a specific method is called after method chaining in C#?

I'm trying to create an API in C# that uses method chaining. I want to ensure that at the end of the chain, a specific method (e.g., Throw()) is called. If this method is not called, an exception ...
Andrey Namikaze's user avatar
0 votes
2 answers
43 views

Set selected values in multi-select drop-down list in .net core 8

In my .Net 8 form, I have a multi-select drop-down list. The selected values are stored in the DB as a string delimited by commas e.g. A,B,C. How should I bind selected values to my drop-down list? ...
joegreen's user avatar
  • 127
0 votes
0 answers
32 views

.net mvc project sdk package error: MSB4019: The imported project "../Microsoft.NET.Sdk.Common.targets " was not found

My project was working smoothly until a while ago I reopen it to find the following error when trying to build it (I'm using vs code) I noticed sdk 8.0.107 being recently updated/implemented ...
Leon's user avatar
  • 1
1 vote
2 answers
40 views

Adding extra properties to ILogger<T> structured logging

Using ILogger<T>, is there a way to add log properties in addition to the ones covered by the message template? For example: _logger.LogInformation("Order {OrderNumber} was registered."...
Sigurd Garshol's user avatar
0 votes
0 answers
52 views

Char code is different between .NET 4.8 and .NET 6

Previously with VB.NET (.NET 4.8) I have read files with the encoding windows-1252 in that way: File.ReadAllText(filePath, Encoding.GetEncoding(1252)) Now in my ASP.NET Core 6 application I'm reading ...
Phoniex's user avatar
  • 191
0 votes
1 answer
32 views

RabbitMQ Client .Net Core Timing Out under load after rabbitmq upgrade. Consumer System.TimeoutException

We have a system that was running RabbitMQ 3.8.5 with RabbitMQ.Client 5.2.0. Part of the way the system uses rabbit is by creating a consumer to wait for a specific command from a different executable ...
Kaizer69's user avatar
  • 403
0 votes
0 answers
26 views

Need to order by list using row value using entity framework [duplicate]

I have data in following format as shown in the sample table data. I want to order by this data in ascending order for ND values. Means like from ND1 to ND10. I tried the following way: return await ...
Sami In's user avatar
  • 330
0 votes
1 answer
30 views

.NET -> how to make API with nested Objects?

Is there any tutorial in .NET how to make the following API structure in which will [HttpPost] DestinationPlan to the database (with nested object of DestinationPlanDays - Destinations - ...
Piotr Deja's user avatar
1 vote
1 answer
31 views

Why HttpClient.GetAsync returns 302 while trying to download zip file from external server? (FIXED)

in my project i have file dowloader spot. Any file i can dowload except zip. When i try to dowload zip file from other server it returns to me redirect. Do you have any idea what can be cause of that? ...
Halil İbrahim Şentürk's user avatar
-1 votes
1 answer
72 views

Synchronize large csv file into DB with dotnet core

I want to develop a batch process in .NET Core to synchronize a CSV file containing 3 million lines. The process reads data from the file, updates existing items in the database, and creates new items ...
Imane Sab's user avatar
-1 votes
0 answers
23 views

How do I Copy Metronic(8.2.6) Files into my Asp.net Core project?

I'm a beginner at metronic,and now i have metronic8(8.2.6) Files. I create asp.net core admin Project,and want use Metronic for UI.but i don't know how to copy Metronic's JS/CSS etc files into my ...
JeanLi_DEV's user avatar
0 votes
0 answers
85 views

How can I improve performance and increase the speed of processing data so that it takes short time read and process 500,000 records

I'm having a .net core console application that reads parts of the JSON files stored in a folder the part of the JSON that I'm reading contains greater than 500,000 records in it, I'm able to read all ...
Janeth Jackson's user avatar
0 votes
1 answer
35 views

How to validate token without kid

Microsoft.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: 'IDX10503: Signature validation failed. Token does not have a kid. Keys tried: '[PII of type 'System.Text.StringBuilder' is ...
Somesh Banjare's user avatar
0 votes
1 answer
33 views

Error during XSLT transformation: An error occurred while loading document 'https://ex.com/example.xml'. See InnerException forcomplete description

I keep getting an error during XSLT transformation: An error occurred while loading document 'https://www.example.com/myxml/example.xml'. See InnerException for a complete description of the error. I ...
Tom McDonald's user avatar
  • 1,814
0 votes
1 answer
47 views

Token Request Failing and Returning error invalid grant

These are the IdentityServer logs: 2024-07-04 21:06:57.551 -04:00 [DBG] Start key discovery request 2024-07-04 21:06:57.552 -04:00 [INF] Request finished HTTP/1.1 GET https://localhost:44322/.well-...
Matt Perejda's user avatar
-3 votes
1 answer
36 views

why don't Show EF Core 6, AppDbContext onModelCreating in modelbuilder.HasDefaultSchema("Schema name"); [closed]

why dont Show EF Core 6, AppDbContext onModelCreating in modelbuilder.HasDefaultSchema("Schema name"); i tried different methods, I almost asked the AIs too, ChatGPT, Bing etc. but somehow ...
Muhammadabdulloh Komilov's user avatar
0 votes
1 answer
29 views

Locale "ar-KW" is not getting listed CultureInfo.GetCultures(CultureTypes.AllCultures) in Windows10 .NET 8 Blazor WASM

I'm trying to list all the cultures available in a dropdown so that end user can choose a language-REGION locale code. I have <BlazorWebAssemblyLoadAllGlobalizationData>true</...
fingers10's user avatar
  • 7,649
0 votes
0 answers
23 views

Why Microsoft don't publish the list of tags on DockerHub repository

Does anyone knows why Microsoft don't use the "normal" repository style on DockerHub ? Why we can't browse the versions and tags ? All the other official images (and unofficial) can be ...
saad's user avatar
  • 935
0 votes
3 answers
43 views

Change cache-control max-age-48000 to cache-control max-age=48000 in response header

I need to change the hyphen to equal to for my cache-control max-age I am not getting where it is coming from kindly help me with it. I checked iis config as well but nothing found there. Thanks in ...
Sabah Nevrekar's user avatar
0 votes
0 answers
45 views

How to preserve large database query results on the server for future processing

I have an ASP.NET Core Razor pages application that displays data in a Javascript chart. In some scenarios, this chart can have up to 1 300 000 datapoints / database rows. Depending on the selected ...
kj49's user avatar
  • 45
0 votes
0 answers
33 views

Bypass Fiddler configuration not working for non-browser

I need exclude an URL from the Fiddler settings, which should be routed internally and not via proxy. Fiddler is configured to act as system proxy and is monitoring all connections. For this I'm using ...
martinoss's user avatar
  • 5,448
-1 votes
1 answer
40 views

In .net core I want to get API through the two tables

In .Net core I have two tables with Buyer, and the relation table as RicePrice: public class Buyer { [Key] public int Id { get; set; } public int Quantity { get; set; ...
Karthick1211's user avatar

15 30 50 per page
1
2 3 4 5
214