Questions tagged [.net-4.8]

For questions specific to the usage and features of version 4.8 of Microsoft's .Net framework.

999 questions
-1
votes
1 answer

Post file in body using react and .NET framework API Controller

I'm wondering how to post files in the request body to an API controller in .NET framework using react. I need to do this without altering the request headers, meaning I need to send it as application/json. What I need is something like this: public…
BigMac
  • 29
  • 1
  • 7
-1
votes
1 answer

Unable to Deserialize data from Nested JSON List

Coming here after learning about C# classes Constructors and ArrayLists so that not to put a completely dumb question here :) I'm trying to Deserialize below Nested Lists of JSON returned from an API GET call as below: I've been able to get the…
Kam
  • 19
  • 5
-1
votes
1 answer

The type 'System.IdentityModel.Tokens.Saml2SecurityTokenHandler, System.IdentityModel' cannot be resolved

I'm baffled with this error. I've looked everywhere and googled everything I know. I'm updating an application from dotnet 4.5.3 to dotnet 4.8. The setup hasn't changed dramatically, this identity config has not changed in a long time. The updated…
Ken Bonny
  • 729
  • 1
  • 9
  • 29
-1
votes
1 answer

How to run dotnet restore forcing the restore to come from .NETStandard instead of .NETFramework?

I had a project which was created in .NETFramework. I have followed the steps on https://learn.microsoft.com/en-us/dotnet/core/porting/ to convert the solution to .NETStandard. In particular all projects in the solution have .NETStandard as the…
-2
votes
1 answer

How to make long running Task not disturbed

Having long running Task, something like this Task.Factory.StartNew(() => { var step = 0; while (true) { Task.Delay(100).Wait(); Console.WriteLine(step); step++; if (step > MaxStep) …
-2
votes
1 answer

.Net Framework 4.8: Cannot cast Enum.GetValues result to System.Enum

I need Something like var enumConstants = Enum.GetValues(enumType) .Cast() .Select(x => ...); as explained in this answer. But I get InvalidCastException. Update: Sorry, the problem was somewhere else. I had…
Yusif
  • 183
  • 2
  • 8
-2
votes
1 answer

.Net 6 Upgrade from Framework 4.8 (API Project)

I am upgrading each project in my solution. I was able to complete the class libraries upgrade and now I have a Web API project to be upgraded. In short, I have added a new project Asp.Net Core Web API and resolving all dependencies. I have landed…
Lucky
  • 81
  • 6
-2
votes
1 answer

Receiving 'ToolTip' cannot have a logical or visual parent

Since updating from .NET 4.61 to .NET 4.8 customers quite regularly receive the following exception: System.InvalidOperationException: "ToolTip" kann keine logischen odervisuellen übergeordneten Elemente besitzen. bei…
Abid
  • 565
  • 1
  • 5
  • 15
-2
votes
2 answers

C# Add file names to labels

I need to display the first 20 files from a folder into 20 labels within my Windows Form. My code fills all the 20 labels with only one file name. Someone help me to fix my code to fill each file to it's label. This is what I've tried to work…
Kamweti C
  • 19
  • 6
-2
votes
1 answer

Why is async not allowing for parallel processing unless I manually create new threads?

I wrote a Windows service, and I would like it to work using the same exact logic that it currently has, but process everything in parallel. The real codebase is fairly abstracted and private, so I can't post the source here but here's the gist of…
AlphaG33k
  • 1,588
  • 1
  • 12
  • 24
-2
votes
1 answer

Parameter with hyphen in Web API 2

I want to follow proper URL convention and use hyphen as word delimiter: /api/books?author-id=3 But property names with hyphen are not supported in C#. How can I bind AuthorId to author-id in .NET Framework 4.8? As an example, consider this URL:…
Jam
  • 386
  • 2
  • 13
-2
votes
1 answer

Please advise the modern architecture of ASP.NET WebApi application

Please advise the modern architecture of ASP.NET WebApi application (better .NET Framework not Core) with the latest innovations. For example: Unit of work pattern, controller -> manager -> repository, Automapper, xUnit, Serilog or..., a reliable…
Boris Gappov
  • 2,483
  • 18
  • 23
-2
votes
1 answer

intermittent OutOfRange exception in mscorlib.dll!string.CopyTo()

instruction from my code: streamIdentical.Write(files[LEFT].subFilepath[leftFileIndex] + ", " + files[RIGHT].subFilepath[rightFileIndex] + " " + files[LEFT].status[leftFileIndex] + "\n"); I copied the variable strings to Watch Window and they…
spinlock
  • 17
  • 3
-2
votes
1 answer

DataGridTextColumn in Datagrid don't accept comma on updating source of binded variable

I created Datagrid in my WPF project and binded ItemsSource with object that contains double type variable amount. I binded DataGridTextColumn with amount variable and used UpdateSourceTrigger to update it on any change by setting it to…
GhostVolume
  • 81
  • 1
  • 7
-2
votes
1 answer

How to remove any given string pairs from text

Unfortunately my regex skills are very bad I would like to code a function that can remove any given pair of strings and whatever between them For example It is a long established fact that a reader will be distracted by the readable content of a…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
1 2 3
66
67