How to make Sonarqube exclude a .NET (C#) project from coverage measures

Sonarqube allows for individual files to be excluded from code coverage by adding patterns in the key. This can be done on a project level by adding them in the UI and even in a .csproj file by speci...

What exactly happens when you call an async method without the await keyword?

I have a web server and there is a periodic job merges and send records (lots of request logs). ``` Task.Run(() => { while (true) { try { MergeAndPutRecords(); ...

26 Jul at 17:3

Angular File Upload

I'm a beginner with Angular, I want to know how to create Angular 5 , I'm trying to find any tutorial or doc, but I don't see anything anywhere. Any idea for this? And I tried [ng4-files](https://git...

7 Jul at 06:0

Ways to secure an anonymous Web API request

I have a (NOT ASP.NET Core) single page application with on the front end. My client (browser) talks to server through ASP.NET Web APIs. Now, the web application is on but . There is no login/ us...

31 Dec at 15:30

'react-scripts' is not recognized as an internal or external command

I've got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks like `mavenapp/src/main/javascript/[npm project files]` Inside my package.json...

27 Aug at 08:14

Dynamically compile a class in App_Code while pre-compiling the rest of the project/library

ASP.NET has specicial application folders like [App_Code](https://msdn.microsoft.com/en-us/library/ex526337.aspx) which: > Contains source code for shared classes and business objects (for example, ....

How to configure "Shorten command line" method for whole project in IntelliJ

When I run tests I get the error "Command line is too long". It works if I set the "Shorten command line" method in the Run/Debug configuration to "JAR manifest" for the specific method or class, but...

27 Nov at 04:3

What does Debug.WriteLine() in C# do?

I was wondering what `Debug.WriteLine()` does. I see it all the time in many different codes, but I don't get what it's supposed to do. What I found out so far: > "Writes information about the debug t...

6 May at 00:54

Asp.net core 2 Prefix Routing

How to create prefixed routing for MVC CRUD operation. I am working on an application that requires admin and front-end. For the admin I want all route to point to `localhost:5000/admin/....` I have ...

Difference between client and server time ServiceStack

I have a web service, built on ServiceStack. It serves protobuf-net requests from window form users. I would simply like to know how to automatically get the user's machine Current Time (for every se...

21 Dec at 13:36

What's the difference between sizeof(T) and Unsafe.SizeOf<T>()?

First of all, a small disclaimer before the actual question: > I know there are a lot of closed/duplicate questions regarding the difference between the `sizeof` operator and the `Marshal.SizeOf<T>` m...

1 Aug at 18:21

System.ArgumentNullException: Value cannot be null, Parameter name: implementationInstance

I deployed .NET core mvc application in IIS, when I run app, the page show 502.5 error, I run command in powershell "dotnet D:\deploy\WebApp\WebApp.dll" ,this follow show detail error content: I know ...

11 Sep at 11:21

How to access Anaconda command prompt in Windows 10 (64-bit)

I had to install the 64-bit version of Anaconda with python 3.5 in Windows 10. I followed the default settings (`AppData/Continuum/Anaconda3`). However, after installation, I am unsure how to access t...

20 Dec at 22:22

Find max value of a column in laravel

The problem started because I have a table (Clientes), in which the primary key is not auto-incremental. I want to select the max value stored in a column database. Like this select, but with eloque...

11 Apr at 20:25

How to get DbSet from entity name in EF Core / .NET Core 2.0

I have a `DbContext` with several `DbSet<T>` properties: ``` public virtual DbSet<A> A { get; set; } public virtual DbSet<B> B { get; set; } public virtual DbSet<C> C { get; set; } ... ``` In certa...

10 Jun at 18:44

Selenium can't find chromedriver.exe

We're upgrading to .NET Core, and we have a crawling engine that uses Selenium for some tasks. We use `chromedriver.exe` and it works just fine in .NET 4.6.1. For .NET Core, we created a console app...

20 Dec at 16:13

C# and dotnet 4.7.1 not adding custom certificate for TLS 1.2 calls

I have the following C# code, constructing an https call with a custom certificate. When using Tls 1.1, the call works fine. When using Tls 1.2 the call breaks. I using curl, using tls 1.2 works fine ...

15 Jan at 07:45

JsonServiceClient returns reponse with correct attribute but empty value

I am trying to make a JSON request on an external service, that would look like this : GET request : ``` https://remotehost/path/mycount?foo=C&bar=21 ``` response : ``` {"count":1000} ``` for t...

20 Dec at 11:10

Does injecting ILogger<T> create a new logger each time?

On the logging samples in [the documentation](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?tabs=aspnetcore2x), there is an example how to inject a logger into a controller: ```...

20 Dec at 08:38

Access Controller from ExceptionFilterAttribute in ASP.NET Core

With ASP.Net Core 2, how could you get access to the Controller instance that an ExceptionFilterAttribute is applied to? Is there a better way to acheive shared "base" controller properties and metho...

8 Aug at 21:48

Go to Implementation with sourcelink

How can I enable visual studio to 'Go to implementation' for library code that is exposed with SourceLink? We recently began using SourceLink in our .NETcore library in an attempt to debug the librar...

20 Dec at 00:42

unexpected http get request using JsonServiceClient

I am trying to make a json request on an external service, that would look like this : GET request : ``` https://remotehost/path/mycount?foo=C&bar=21 ``` response : `{"count":1000}` for this I ...

19 Dec at 21:43

Xunit Unit Tests will not run

I am completely stuck on this issue. So my team has a unit test project in a services test project. The tests are discovered in the test explorer pane however when I try and run the tests I get these ...

Compatible AES encryption and decryption for C# and javascript

I am trying to write two classes in C# and Javascript which I can use throughout my project to encrypt or decrypt data using AES when data is exchanged. Using AES I am embedding the Salt (32 bytes) a...

How to use Dependency Injection in AWS Lambda C# implementation

I have created Lambda functions using AWS.Net SDK, .net core version 1.0. I want to implement dependency injection. Since lambda functions triggered and run independently in AWS environment, there is ...

19 Dec at 13:40