Skip to main content

All Questions

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
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
-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
0 votes
0 answers
12 views

Where can I use FromService attribute in Asp.net core? [duplicate]

Hi I want to know where and when I can use fromService attribute for inject services in asp.net core?
Ershad Raoufi's user avatar
0 votes
1 answer
78 views

Asp.net core 8 select multiple with default selected not working after upgrade

This code for select multiple with default selected options was working fine on .netcore 5 but after upgrade to .net 8 selected options not working c# code List<int> currentContentCatIDs = ...
Ahmad Alaa's user avatar
0 votes
1 answer
56 views

XUnit testing with third party API

I am using a third party API which inserts a record into the database. The basic setup of my project is: Repository public class MyRepository { public void InsertRecord(Customer c) { //...
He-Man's user avatar
  • 19
0 votes
0 answers
44 views

Using Basic Authentication and JWT Token Authentication both in a .Net Core Web API Application

I have a .Net Core web API application currently using JWT Token Authentication approach. there is a requirement to provide some APIs to a exnternal integration with Basic Authentication approach. How ...
udaya726's user avatar
  • 1,010
0 votes
2 answers
900 views

Facing issue for Azure Function with Dot Net 8 at locally in Visual Studio Code

I have created a C# function in Azure using Visual Studio Code and followed the below steps to Select a language for your function project --> Choose C#. Select a .NET runtime -- > Choose .NET ...
ShreeShivay Namastubhyam's user avatar
0 votes
1 answer
69 views

Allow running .NET 8 app with .NET 6 runtime

Is there a way to allow running a .NET 8 app with only a .NET 6 and .NET 7 runtime installed? Assuming the app doesn't use any new .NET 8 only features. I realize this is not a good practice, but I am ...
Wirable892's user avatar
0 votes
2 answers
118 views

Custom Response for Policy Based Authorization

I have an Authorization Handler but if it fails, I want the response to be 401 with a response body. public class TokenValidationAuthorizationHandler: AuthorizationHandler<...
Hans Info's user avatar
0 votes
1 answer
32 views

Building an ASP.NET Core app for deployment

I'm using the dotnet CLI on macOS and am trying to build/compile my ASP.NET Core app. When I run dotnet build --arch win-x86 --self-contained true, I get an error The specified RuntimeIdentifier 'osx-...
Jesse's user avatar
  • 1,215
0 votes
1 answer
46 views

MacOS C# X509Store access is denied

When trying to initialize an instance of the System.Security.Cryptography.X509Certificates.X509Store the following error occurs. using var x509Store = new X509Store(StoreName.Root, StoreLocation....
Nikita's user avatar
  • 3
0 votes
3 answers
174 views

How to Export CSV without using any Package in C# (,NET Core)?

How can you create a well structured csv file without using any packages in .NET core. And use class Keys as Header. public class TestArray { public string LastName{ get; set; } ...
Ashish Prajapati's user avatar
1 vote
1 answer
305 views

Unable to resolve 'Microsoft.NETCore.App.Ref (= 6.0.27)' for 'net6.0' when building using .NET 8.0

I am getting the below error while trying a build a project using .NET8. error NU1100: Unable to resolve 'Microsoft.NETCore.App.Ref (= 6.0.27)' for 'net6.0'. The machine doesn't have internet ...
subbaraoc's user avatar
  • 1,236
0 votes
1 answer
52 views

Convert datatable to pdf with custom header and footer in .net core 6 mvc using itextsharp 5.5.13.3?

I want to generate pdf with data from Datatable and set custom header and footer. private void ProcessEMICalendarDocument(DocumentGenerationRequestModel item, List<MemoryStream> templateStreams, ...
Ram Anugandula's user avatar

15 30 50 per page
1
2 3 4 5
83