Category "c++sharp"

Class cannot find another class in the same namespace

I have a C# WebApp that we are doing for a client. I have two classes in the project, defined (in separate files) as such... A general utility library: name

Multipart form doesn't receive fields

I'm trying to get a file and model to my api controller and test it by sending request from fiddler. So far I have managed to receive a file using MultipartData

How to find oaut_consumer_key in Twitter api?

I was downloading a Demo of Twitter "xAuth with .NET" from this Article link http://www.voiceoftech.com/swhitley/index.php/2010/03/twitter-xauth-with-net/ Click

Project file could not be loaded, data at root level is invalid, no XML in the project

I am trying to run a hello world C# code from command line and this is the batch file. Tried searching for it but most of the questions are about the XML file r

How to get only specific tables to create models from database with Entity Framework Core in C#

I'm using Scaffold-DbContext to create models from an existing database, but it auto pluralizes the table names and I don't want that. It also gets all the tabl

Reading the SECURITY_ENABLED flag of Group in Active Directory

I'm trying to read the SECURITY_ENABLED flag of a groups groupType property. The problem is that the value I retreive by using DirectoryEntry entry... entry.P

How to Compress JSON data in angular 4 app using gzip compression & send it to server using Http post?

I am using pako library for compression: var binaryString = pako.gzip(data); At server side (.net core) i am using middleware to decomopress the zipped stri

How to return a result from an async task?

I would like to return a string result from an async task. System.Threading.Tasks.Task.Run(async () => await audatex.UploadInvoice(assessment, fileName));

I can't see the folders I created in my project

I have been working on a project in C# in Microsoft Visual Studio 2012. Since I have a lot of C# files I decided to put them in a few folders based on their typ

Json.NET: how to remove assembly info from types in the resulting json string?

I am serializing using Json.NET, but the resulting string ends up way too long, because it includes a ton of surplus info about the assembly that I have no use

Get/Set Annotation from/in existsing PDF using itextSharp

I'm working on a project where i have to read an existing pdf using iTextSharp.PdfReader, then getAnnotations in order to insert them back in a new generated pd

.net core injecting and resolving services

I am trying my hand at .net core web api. I have created a static method for registering my controllers like this: public static class RegistrationExtensions {

How to move the cursor in a DataGridView c#

How to move the cursor in a DataGridView? No. .Selected = true; as this puts the cell in blue by default! I want the cursor to move When I click on "Add" button

How to effectively change authentication method in ASP. NET web.config?

I am trying to launch ASP.NET project on a local computer. IIS responds with 401.0 status code, stating that "authenticated user does not have access to a resou

Web.config causing "blocked by group policy" error

The myriad of different web.config settings have always been a bit of a mystery to me. I'm glad Microsoft has cleaned up some of the content put there by defaul

Transparency for windows forms textbox

I'm using windows forms in C# and I need to make a textbox's background color transparent. I have a trackbar that goes from 0 to 255 that is supposed to control

Reading an .eml (outlook email) file using c#

I'm writing a service that cleans files by removing all malicious content. I'm using Interop Excel & Word api's like this: Excel var excelApp = new Mi

MS Word 2010 Could not open macro storage

I am creating Word Document Using Word Template Following is code Word.Document wordDoc = new Word.Document(); wordDoc = wordApp.Documents.Add(ref oTempl

Moq with Unity Container unit testing

below is an example of production code that I am trying to unit test. I am struggling to resolve a dependency to a concrete class that is being used. public My

Reading an .eml (outlook email) file using c#

I'm writing a service that cleans files by removing all malicious content. I'm using Interop Excel & Word api's like this: Excel var excelApp = new Mi