Category "c++sharp"

How to export a registry key in C#

I am trying to write a C# code, which will block exe files from running. I found a question about the same topic: example question. In the question suggested me

How can an authenticated user access the drive that is publicly accessible?

With this code, I am able to get the files that have been shared to the service account email. But, when I shared the folder (that was not owned by me, but is p

Is there a way in Fluent Validation library to remove the index from the collection validation errors?

I'm using Fluent Validation to validate this model: class MyModel { public int Id {get; set;} public List<ChildModel> Children {get; set;} } clas

Setting up IActionDescriptorCollectionProvider for a unit test

I am currently writing unit tests for a TagHelper that uses IActionDescriptorCollectionProvider in its constructor. My setupt looks as below so far - any ideas

I get the error "Invalid item ID firebaseappcheckinterop-16.0.0-beta01" during build

The question is as the title suggests. The environment is Xamarin.Forms in Visual Studio 2019 on Windows. The error is not occurring in another project, and I t

Sometimes one record from the set does not get into the database using EF Core and TimescaleDB

I faced pretty strange behavior in my tests, when only one record from the set is not added to the database and this happens from time to time, not always. Here

SetVirtualHostName within WebMessageReceived event handler doesn't work

I'm trying to dynamically create an image within a WebView2, using a source passed in from the WebView2's containing application. The source image exists on an

how do you set same error message for all required attribute validation?

I am new to .net core. The following code changes all required validation message to "This field is required" for asp.net framework. public class CustomRequir

Getting the ID of an inserted record instead of a "TTCError" from Oracle using .Net

We are updating an older application to use the "new" Oracle.ManagedDataAccess instead of the locally installed Oracle Client. But since then a simple statement

EF Core 3.1 The property 'Geometry.UserData' could not be mapped

I have a database-first .net core 3.1 web application which connects to SQL Server database table with a geography column. The database scaffolding and applicat

C# renamed class reference issue

We have ASP.NET MVC application which is running on windows server machine. I have renamed classes to satisfy sonar scanning. The code deploys and runs without

How to read appsettings.json in xunit test project?

I am trying to write the test cases for one of the method written in MVC controller and in that method I am reading AppSettings.json file. as below public class

Call external library from asp.net web form

I need to call a function which sets off a bunch of long running database operations from an asp web page. My function is in an external class library. I simply

How to properly setup JwtBearerOptions

I setup Identity Server 4 to issue JWT tokens to authenticate users. In Identity Server 4 I have setup the following: public class Resources { public stati

CertEnrol import pfx The password you entered is incorrect

I'm created pfx certificate using by certEntroll when I imported on windows 10 it's imported successfuly but when i tried on windwos 7 i got an error "The passw

HttpClient Modifies BaseAddress in Some Cases [duplicate]

On a basic level, I should be able to set an absolute BaseAddress on HttpClient and then send Http requests with a relative Uri. The expectati

Sending json through api post request

I'm currently struggling to send a JSON via post request into my controller to use it further by calling a stored procedure. Here is the post request using axio

How do I know if a Coroutine is still "waiting"? [closed]

All I can find online is "How to check if a coroutine is running", which is not what I want. Say if I have a coroutine with yield return new W

Audio file path not dynamic

I need the audio file to played when the app runs and it does this successfully, the only problem is is when I move the application to a different PC, the sound

How do you make a new FlatButtonAppearance object?

I'm running into a frustratingly stupid problem with the FlatButtonAppearance object, which apparently has a constructor that I can't find any information about