Category ".net"

What does it mean when saying "passing in something" in the following?| ASP.NET Core

I was reading a book about Learning ASP.NET Core API when I run to a part saying: We call GetCommandByID on our repository passing in the Id from our route, st

Unzipping error - Unexpected end - Using ZipArchive

I got the following Code: Dim ms = New MemoryStream() CustomReportVorlage.ExportToPdf(ms) Dim bt2 = ms.ToArray() Dim outStream = New MemoryStream()

SAP B1 studio for ms visual studio 2019

How can install the SAP Business One Add-On Project template in Visual Studio 2019? I need to build a Add-On with C# but I don't know how to the templates or wi

DynamoDB ConditionalCheckFailedException - obtaining the item content that failed the test

I'm using precondition expressions on PutItem and UpdateItem requests. Is there a way to achieve either or both of the following: not throw an exception - this

Automapper with EnumMapping throws on nullable Enums with unknown value

I have a nullable enum property on the source side and get this property with value 0 instead of NULL. But 0 is not a represented value in the enum so AutoMappe

How to develop ms excel ribbon functions

how to develop ms excel ribbon functionality not COM add-ins or VSTO add-ins. Using visual studio Thank you I want to implement excel ribbon functions to valida

Visual Studio: ScriptLoggingBuilderExtensions.cs not found when debugging

I am using Visual Studio version 16.7.3 (latest) and recently came upon a problem. I am creating an Azure Function, using .net Microsoft.Azure.WebJobs. Everythi

Ado Api call fails for a specific API

I am trying to call this ADO API - https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/users/get?view=azure-devops-rest-6.0 I am azure SDK and have cre

What does "object is enumerated" mean in C#?

I've been reading lately articles and documentation about deferred execution, LINQ, querying in general etc. and the phrase "object is enumerated" came up quite

EF6 allow read but disable insert/update/delete during transaction

I am doing some "sync" between different platform. During this sync I try to add/update/remove records. For it I'm wrapping all functionality in TransactionScop

.NET CORE, how to get file location for an exception in a web app, in middleware?

I've seen this question: How can I get the line number and file name from an exception in net Core? And tried the code, but it always says line 0 and no file na

Fill the DataSource of a DataGridView with existing Columns

Is there a way to fill the DataSource of a DataGridView using the existing Columns? I'm trying to set a DataSource to my DataGridView; every time I set my DataS

Powershell certificate scripting using HttpClient

I am looking to use powershell to get certificate information from different API's using HttpClient. (Trying to write a script to find when certificates expire)

JsonElement and null conditional operator (KeyNotFoundException)

I have a JSON object that I get from API and I need to check for error in the response of the JSON. However, when there is no error the error value is not prese

Uploaded Image to Sharepoint using Graph API contains no Content (.NET)

I alreadey use the following method to upload files (docx, xlsx) to our sharepoint. Now i'm trying to upload images (png, jpg) to the same library. I don't get

How can I embed a variable on build from a text file I read?

I am working on C# winform application and I had setup .env files with this package https://github.com/tonerdo/dotnet-env, the problem is I can't access my data

The resource string "UnsupportedProjectType" for the "CompileWorkflowTask" task cannot be found

After I install Visual studio update 16.10.3. MSBuild stopped compiling my Workflow Foundation project. I made lots of search but unfortunately I could not find

Could not load file or assembly 'System.Buffers, Version=4.0.2.0...'

I'm getting the following exception when trying to call GetDatabase method of the MongoClient class after adding a new configuration using VS config. manager: C

BOM Preamble in .NET Rest API causing Twilio Parse Error 12100

We have a .NET Rest API that is a web-hook for Twilio. It returns a TwilioResponse object. Suddenly, Twilio is reporting a Parse Error 12100 on the hook. We lo

Create WebApplication extension method in external library

I'm trying to create an extension method to register some routes in an external library using C# .NET 6. I can'f find a way to do it because i cannot reference