69 questions
Best practices
0
votes
6
replies
132
views
How can I override a property in a way that gives me static access to the property?
I'm developing a winforms application with an underlying database. My system has a BusinessFunction which describes the business functions a user with a given role is able to perform, and the ...
0
votes
1
answer
145
views
Is this an acceptable awaitable replacement of ManualResetEvent using TaskCompletionSource [duplicate]
I have a processing loop that is meant to run for the lifetime of the process. I'm in the midst of converting from a BlockingCollection to an async/await pattern using Channel. I want the ability to ...
0
votes
2
answers
131
views
Task or Thread for BlockingCollection processing
I googled and I looked at the similar questions here and I just cannot find a clear answer. My problem is all of the examples for blocking collection don't seem to consider long running or async. So ...
0
votes
1
answer
155
views
How to update Microsoft.Data.SqlClient 1.1.3 to 3.1.7 referred indirectly Microsoft.EntityFrameworkCore.SqlServer without updatiing this Nuget
I have a .NET Framework web app that has service and data layer targeting both .NET 4.7.1 and .NET Core 8.0.
The blackduck identifies a vulnerability in Microsoft.Data.SqlClient 1.1.3. Updates ...
0
votes
0
answers
68
views
ASP.NET MVC web app on .NET 4.7.1 updated Microsoft.Data.SqlClient Nuget Update from 1.1.0 to 5.2.2/4.0.6
My ASP.NET MVC web app on .NET 4.7.1 updated Microsoft.Data.SqlClient Nuget package from 1.1.0 to 5.2.2.
I get this error:
Microsoft.Data.SqlClient.SqlException:
'A network-related or instance-...
1
vote
0
answers
326
views
Accessing Sharepoint 2016 with .Net Core 8.0 fails with 401 Unauthorized Error, with .Net Framework 4.7.1 everything is fine
I am trying to access a SharePoint 2016.
If I am using that code in a .Net Framework 4.7.1 application everything works as expected:
using (var clientContext = new ClientContext("<...
1
vote
1
answer
54
views
ASP.NET MVC + CastleWindsor: change resolution by header or query string
I have an ASP.NET MVC app running on .NET 4.7.1 that is using Castle Windsor (5.0.0) as its DI container. Since this version of MVC uses a ServiceLocator pattern, I'm wrapping the container inside of ...
0
votes
0
answers
81
views
How to hide or eliminate range markers in WPF slider
I am making a slider user control. I need the IsSelectionRangeEnable = "true" but I do not want the triangular markers that appear on the slider (shown in the image).
Fragment of slider with ...
1
vote
1
answer
82
views
Handle issue "PlatformNotSupportedException" for HttpClientHandler.SslProtocol in .netstandard2.0 project
I have .netstandard2.0 project which is used by two projects. One is .net core project and one is .netframework4.7.1. I'm getting "PlatformNotSupportedException" for HttpClientHandler....
0
votes
0
answers
87
views
How to moq an HttpContext for a method the implements IHttpHandler's ProcessRequest in .NET framework (not core)?
I have a class that implements IHttpHandler interface in .NET 4.7.1.
The class implements ProcessRequest which accepts an HttpContext instance.
I am trying to create a test for ProcessRequest using ...
0
votes
0
answers
311
views
the program works on .NET framework 4.7.1 and doesn't work on .NET 6.0
There is a project from Github https://github.com/versex799/FanucFocasTutorial which is qritten on c# .NET framework 4.7.1. Works ok.
Trying to make the same on .NET 6.0 I get an error
"System....
0
votes
0
answers
993
views
How do I get the error message from a HttpClient.GetAsync in .net Framework 4.7.1?
I am trying to translate a PowerShell API call to C#. For some compatibility reasons I have to use .net framework 4.7.1.
When I call the API with PowerShell code I get a clear error message "No ...
0
votes
0
answers
28
views
HttpClient.SendAsync throwing nullreference exception on http 204 [duplicate]
In a .Net 4.7.1 targeted application I am using HttpClient to perform Http requests.
When performing a GET request for a URL that returns a Http 204 result (no content), this results in a System....
1
vote
1
answer
431
views
How to map a list in response to a different list in a variable
I am trying to map the Id and name in SearchCompanyResponse to the variable companies that is a list of Company.
var searchCompany = new SearchCompanyRequest();
searchCompany.Query = request.Name;
...
1
vote
1
answer
1k
views
Any idea whether TLS 1.3 works with .NET framework 4.7.1?
Asking here to see whether .NET Framework 4.8 really needed for TLS 1.3 as the documentation is creating confusion. My existing app using .NET 4.7.1.