What's the point of passing ExceptionDispatchInfo around instead of just the Exception?

I understand the value of `ExceptionDispatchInfo.Capture(e).Throw()` (preserves the original stack trace), but what's the advantage of using `Capture` early and passing the `ExceptionDispatchInfo` aro...

26 Nov at 19:41

ServiceStack confusion between metadata, OpenAPI, and Swagger

I'm working on documentation for an API server implemented using ServiceStack. I have a few questions. If it makes more sense, I can move these to separate posts. 1. IgnoreDataMember is mentioned ...

17 Aug at 18:10

Cannot convert type 'Newtonsoft.Json.Linq.JObject' to Complex Type

I have json as follows, ``` { "H": "Macellum", "M": "Receive", "A": [ { "CustomerId": "172600", "OrderId": "69931", "OrderStatus": "E0", "Buy": "A" } ] } ``` ...

16 Aug at 14:23

Download file with WebClient or HttpClient?

I am trying to download file from a URL and I have to choose between WebClient and HttpClient. I have referenced [this](https://stackoverflow.com/questions/20530152/deciding-between-httpclient-and-web...

16 Aug at 10:44

How to stop a command in the Visual Studio Code terminal

I've been stopping commands with the trash can for too long. Command period doesn't work on Mac. I can't find anywhere how to stop the terminal via a command. What is it?

14 Aug at 07:58

Adding external login with Identity Server 4 and ASP.NET Identity

After adding Authentication functionality using Identity Server 4 with ASP.NET Identity, I'm planning to add the Google Provider so users can also login with their google+ account. I'm using Angular a...

Claims transformation support missing in ASP.NET Core 2.0

I am using JWT Bearer auth in my new asp.net core 2.0 api app and want to add some extra claims to the current identity. This extra info is located in another api which need to be queried. My understa...

How to sync MSSQL to Elasticsearch?

Every time I Google this, I find the "river" approach which is deprecated. I'm using Dapper if this is somehow a helpful information. So what's the solution for this these days?

Entity framework EF.Functions.Like vs string.Contains

I was reading the announcement of entity framework core 2.0 [https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-entity-framework-core-2-0/](https://blogs.msdn.microsoft.com/dotnet/2017/08/1...

.net-core middleware return blank result

Im making a website with an API, the API needs validation so the user only gets his own data. I have written the following middleware to validate the login. ``` public class ApiAuthenticationMiddle...

23 Sep at 09:43

.NET Core, failed to spawn dotnet --info

When I type `dotnet --info` in cmd the entire screen is covered in `Failed to leave breadcrumb` What can cause such behavior? Searched on google but it seems like I'm the only person that has that pr...

fetch() unexpected end of input

I am using fetch() to grab data from api server. My error looks like this: ``` Uncaught (in promise) SyntaxError: Unexpected end of input at fetch.then.blob. ``` Can you please tell me what am I...

15 Aug at 16:21

Search input with an icon Bootstrap

No clue how I can do this, since BS 4 doesn't support glyphicons. Do I set it up as a background or do I apply different positioning to a font-awesome icon? This is my code so far: ``` <link rel="s...

yield return vs. return IEnumerable<T>

I've noticed something curious about reading from an `IDataReader` within a using statement that I can't comprehend. Though I'm sure the answer is simple. Why is it that whilst inside the `using (Sql...

How do I setup multiple auth schemes in ASP.NET Core 2.0?

I'm trying to migrate my auth stuff to Core 2.0 and having an issue using my own authentication scheme. My service setup in startup looks like this: ``` var authenticationBuilder = services.AddAuthen...

.net-core-2.0 azure app service 502.5 error

Getting a 502.5 error after CI deployment to azure app service. When running `dotnet {myproject}.dll` on the debug console this is the error I get: > Unhandled Exception: System.IO.FileLoadException...

Array types with same element type & rank not equal

Very simple: ``` var equal1 = typeof(object[]) == typeof(object).MakeArrayType(); var equal2 = typeof(object[]) == typeof(object).MakeArrayType(1); var equal3 = typeof(object[,]) == typeof(object).Ma...

15 Aug at 13:39

Use .net DLL with broken References

I have to use a DLL as an API in my application (C#, .NET 4.5). I can reference the DLL normaly. No error at all. But if I want to use any class of this DLL, I get the following compile error: > Erro...

21 Sep at 15:33

Failed to resolve: com.google.android.gms:play-services in IntelliJ Idea with gradle

I'm trying to add google play services to my libGDX project in IntelliJ Idea. I've followed the setup guide here: [https://developers.google.com/android/guides/setup](https://developers.google.com/and...

Comparing 1 million integers in an array without sorting it first

I have a task to find the difference between every integer in an array of random numbers and return the lowest difference. A requirement is that the integers can be between 0 and int.maxvalue and that...

6 May at 20:44

Strange debug output in app since upgrade to Visual Studio 2017 15.3.0

My xamarin android app constantly prints the following debug output since I upgraded to Visual Studio 2017 15.3.0: ``` 08-15 09:13:23.275 D/Mono ( 3119): [0x9a5be930] worker unparking, timeout? no...

17 Aug at 17:41

Task.WhenAll for ValueTask

Is there an equivalent of `Task.WhenAll` accepting `ValueTask`? I can work around it using ``` Task.WhenAll(tasks.Select(t => t.AsTask())) ``` This will be fine if they're all wrapping a `Task` bu...

16 May at 00:26

How to enable C++17 in CMake

I'm using VS 15.3, which supports integrated CMake 3.8. How can I target C++17 without writing flags for each specific compilers? My current global settings don't work: ``` # https://cmake.org/cmake/h...

8 Aug at 02:16

JWT on .NET Core 2.0

I've been on quite an adventure to get JWT working on DotNet core 2.0 (now reaching final release today). There is a of documentation, but all the sample code seems to be using deprecated APIs and c...

15 Aug at 07:54

Different DLL but should be the same in console application and website

I have a console application and website that use the same `System.Runtime.Serialization.Primitives.dll` assembly. However, when I run the website, my assembly is the one on the right, but if I run c...