Category "c++sharp"

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

Zipfile OpenRead throws Access to the path is denied exception in c# uwp app?

I've been using the following piece of code for months without a problem and all of a sudden, it throws at me the "Access to the path is denied" exception. I've

How can I connect to IBM MQ via the AMQP API in .Net Core

I am using "AMQPNetLite.Core" to connect to the IBM MQ server. However, when I try to new the connection there is an OperationCanceledException thrown. Address

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

How to get Direction after cueBall collide with any ball in unity3d? Like in 8 ball pool

Hi! i am making something like 8 ball pool in 3d with unity 3d C#. A is que ball and I know Dir1. I want to calculate Dir2.I am using Raycast to i can get poin

generic type conversion in C#

Is there any way the following code can be improved. I'm aware of the non nullable reference in C# 8.0 and was thinking either that or any other way they code b

integrated google analytics in react application but blocking analytics.js by content-security-policy which is added from backend asp.net core

string script_src = $"script-src 'self' 'unsafe-eval' 'unsafe-inline';"; context.Response.Headers.Add("Content-Security-Policy", new StringValues($"default-sr

The parameter data type of UInt32 is invalid. (MS SQL Server)

In general we are supposed to pass integer values to our stored procedures and to do so we usually do it with this method command.Parameters.AddWithValue("@para

Use C# Task Scheduler library to End Task

I'm currently using this library for the windows task scheduler https://github.com/dahall/TaskScheduler What I want is to end the running task. In my research,

"Internal error in the expression evaluator"

I've encountered a problem in expression evaluator of visual studio 2015 that says "Internal error in the expression evaluator", after some investigations I fou

Embed JavaScript files inside a .NET class library for Blazor project

I'm working on a Blazor project and I'm trying to move one of the JavaScript files to a class library, I've read the following guides: https://docs.microsoft.co

How to import protobuf well-known types in AspNet Core gRPC Service

I', scratching my head about how to import "google/protobuf/empty.proto" to my proto file. What I'm doing so far: In my .csproj file, I added the following: &

MissingMemberHandling.Error force exception when deserializing the HTTP body

I am creating a restful web-service using .net and Newtonsoft for serialization/deserialization. The aim is to force exceptions (preferably HTTP 400) when a re

Selenium C# DefaultWait IgnoreExceptionTypes does not work

I'm using DefaultWait while waiting for an WebElement to be clickable. Although TargetInvocationException is one of the exceptions in my list of exceptions to b

C# Setup Project for winforms app (.NET Framework) does not create start menu company directory

I have two versions of a Winforms project built using VS2019. "AppNetCore" is written using the Windows Forms App template, "AppNetFramework" with the Windows