Category "c++sharp"

Why doesn't scaffolding work as expected?

I am trying to scaffold and I get the following error: There was an error running the selected code generator: 'No parameterless constructor defined for typ

Status code unknown Error at IndexDocument()

I want to inject a data set using C# and elastic + kibana version 8.x. On console at Kibana it works fine. The dataset is not saved at elastic and at the C# cod

ASP.NET 5 Authorize against two or more policies (OR-combined policy)

Is it possible to apply authorization against two or more policies? I am using ASP.NET 5, rc1. [Authorize(Policy = "Limited,Full")] public class FooBarControll

.net maui blazor - Show image from android internal storage

Im using the .net maui blazor to get the device to take a photo, then as its taken it, i wish to display it on the screen so the user can see what image they ha

Smart home report state SYNC new device | Requested entity was not found. [404]

I've implemented the HomeGraph API with the help of the package Google.Apis.HomeGraphService.v1 (1.50.0.2260) It seems to work fine as well, the ReportStateAndN

Calculate / Estimate the compressed file size without performing compression

I want to calculate / estimate what would be the file size of image (.jpg) after doing compression with Encoder.Quality value. Here I should not perform any com

How to get all DbSet from DbContext

I need to get all tables in the database using EF. I need them to go table by table and extract certain information from each. Any idea how?

CryptographicException in Classic ASP with MySQL TLS

I am facing this issue when I am trying to invoke a COM Visible c# class in classic ASP Page which tries to execute one MySQL query against database.(Here MySQL

How to set Microsoft.Azure.Devices.Client.DeviceClient KeepAliveInSeconds to a higher number than 30

I am investigating using MQTT (or AMQP) over a satellite connection. I am using MQTT over HTTPS towards an IoT Hub in Azure. Data is very expensive on satellite

Does Java have a similar post method diamond operator that C# has?

The Unity project makes frequent use of C# functions that supply a type in a diamond operator after the method name. In the Unity source code it's defined like

What is the difference between using and await using? And how can I decide which one to use?

I've noticed that in some case, Visual Studio recommends to do this await using var disposable = new Disposable(); // Do something Instead of this using var di

Inputted Items sometimes appear empty in Data grid

I have ItemsControl and a DataGrid in a WPF UserControl. this is how it looks like when the "Add to card" button is pressed a ViewModel instance is added to Obs

Is it possible to set custom DNS resolver in C#'s HttpClient

what exactly I want : public static CustomDnsResolver : Dns { ..... } public static void Main(string[] args) { var httpClient = new HttpClient();

Can't Add Reference to Visual C# Console App in Visual Studio

I have created a Visual C# Console App and I am trying to add reference to resolve an error. Since I am new to the IDE and I am looking for some help on how to

Custom auth "The oauth state was missing or invalid"

My team and I created a custom OAuth to be used for external SSO. It works on localhost but as soon as we take it up to our staging environment we get an "The o

Prevent application being runned from network drive

I wonder if it was possible to prevent or at least detect if my application is being used from a network drive instead of a local folder/drive. I wish to infor

Is there a way to alter ChildContent in Blazor

I'd like to alter ChildContent my component receives from the parent like this: <Markdown> # Title Some _Content_ </Markdown> To interpret t

FluentValidation: How to show client-side validation

I am using FluentValidation public class AddressModel{ public string Street{get; set;} public string City{get; set;} public string State{get; set;} pu

Moving Mail to Outlook Sent Folder. Mail is still editable

I am editing an email and send it to the recipient. But i also want to save the original mail in the sent folder. But if i move the mailobject to the folder the

Log4net integration with google-big-query

I'm trying to capture the logs using log4net package and store it in google bigquery table. I have successfully captured the logs and stored it in file. I can a