Category "c++sharp"

JetBrains Rider - configure appsettings overrides

I am trying JetBrains Rider for my existing .NET Core project. In the project I have several appsettings.json overrides: appsettings.Development.json - for dev

Check whether string in palindrome : C# code efficiency

I am coming from C background and recently started writing in C# so please don't mind if my question seems somewhat basic. Basically, i want to write a function

How to return HttpStatusCode 404 for incorrect url with FallbackPolicy set in AuthorizationOptions?

In the web application I'm currently working on there is a requirement for all users to be authenticated. This is currently handled by using an AuthorizeFilter.

Is synchronization required when passing a cancel flag with P/Invoke?

I am passing a cancel flag by reference (or by pointer) to a C++ DLL by P/Invoke. The flag will be set at some time in C# code, and the C++ code checks for the

Use Httpclient.GetStreamAsync() is too slow when ipv6 is not disable in C#

Just like C# code, httpClient.GetAsync() use 10 second or more when ipv6 is not disable. But when I disable ipv6 in win10 System, httpClient.GetAsync() just use

I want to change color of mark on axis in WPF chart

I tried to change color of marks on axis (small lines near numbers), but it didn't change them, instead they just disappear. Here is what I've tried: <DVC:Ch

Could not load type Castle.Proxies.IReadinessProxy when running xUnit integration tests in parallel with Autofac

I am having an issue that I've been many days unable to resolve. I use xUnit with a given-then-when abstraction to make tests more readable. I am using a wrappe

Decorating AdditionalText-derived class for "build_metadata.additionalfiles.some_property"

I'm building a source generator that catches csv files marked with the name of the generator. Having <AdditionalFiles Include="File1.csv"> <Gener

AWS KMS manual key rotation and old encrypted data

I'm trying to enable client-side encryption for the data uploaded to AWS S3 by following the guide: https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/k

Renaming layout tab autocad c# .net

the following code is intended to rename the layout tabs in autocad. It renames always the first 2 layout tabs. When I add more tabs before running the program

Is there a more Functional way to aggregate a collection into set of Mongo Filters conjugated by OR?

We have a microservice which enables consumers (indirectly) to query a database, where we have our own logic to limit what consumers can do with the queries. Wh

Http post .csv file Angular 2 and then reading it on the server .NET

I'm trying to send .csv file from my client app (angular 2) to my web api (ASP.NET), and I have done the following: Tried to make FormData from my .csv file t

Hangfire Not Getting Configurations when I try to run Test Case for the method containing hangfire activation .net Core REST Web API

public async Task<IActionResult> SendOrders() { try { RecurringJob.AddOrUpdate("powerfuljob", () => _lab.SendOrders("

How to pass arguments in command line using dotnet?

the command dotnet myapp.dll -- [4, 3, 2] throws the exception System.FormatException: Input string was not in a correct format. I do not know the syntax. How s

.NET Newtonsoft Allow property to be only serialised

I have implemented the answer from this (rather old) question https://stackoverflow.com/a/31732029/4180176 but it doesn't seem to work for me and I can't figure

Storing DateTimeOffset value without milliseconds in SQL Server using EF Core

Say I create a DateTimeOffset value like this: var dt = DateTimeOffset.UtcNow; And I want to store this value in SQL Server using EF Core code-first. How do I

net::ERR_CERT_AUTHORITY_INVALID in ASP.NET Core

I am getting the net::ERR_CERT_AUTHORITY_INVALID error in ASP.NET Core when I try to request my Web API from an SPA. The first solution to fix the issue was to

What is default maximum request length in .net core

I want to know what is default maximum request length in a .net core application. I read from few links that the default limit is 4 MB for asp.net applications

How to use Serilog.Log.ForContext with F# function or C# Method

Using Serilog and F# how to use .ForContext with functions? it appears it only accepts type classes: type A()= log = Serilog.Log.ForContext<A>() // c

C# Razor partial view using an iFrame returns dictionary error "`1" and "`2"

I am attempting to load a partial view into an iFrame and receiving the below error. When loading the same partial not inside of a iFrame, there is no issue. Lo