Category "c++sharp"

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

Hide swagger bad response example model in net core 2.2

I upgrade my netcore 2.1 project to 2.2 and i have a problem with my swagger page. Previously in swagger bad response it only show "Bad Request" without the mo

ASP.NET show dynamic changes on all clients

I'm a beginner with ASP.NET and webapplications in general. For a project I have to interact with an enginnering software to read some data, for this I have to

Transactionscope throwing exception this platform does not support distributed transactions while opening connection object

TransactionScope is throwing a exception in .net core 2.2 In this example I created a scope of TransactioScop. Opening SQL transaction for one database which is

How do I call a string inside a different class? [closed]

I'm trying to call a string that's inside a different class, and am wondering how to do so. Currently my though process is just Console.WriteL

.NET Core Worker service host as a Windows Services (using Coravel for task scheduling)

I have created a worker service to schedule a task using Coravel is a .NET Standard library and it is working as expected. I want to host the same as a windows

WPF Datagrid seems to keep validation error references even after a new item source

I observed a very strange issue related to WPF DataGrid validation that occurs only in some conditions. To reproduce the issue I have a test window. <Window

Compilation error after publishing individual Razor page. Persists after publishing entire project. ("Compilation references may be missing")

Today I was working on a .NET Core 3.0 project (VS 2019). I added a CSS class to a <span> on one of my pages. That's it. Nothing else. I figured publishin