Questions

AuthorizeRequestValidator: Error: Invalid grant type for client: implicit

I am trying to setting up Identity Server 4 `HybridAndClientCredentials` on .NET Core 2.0 MVC. I'm struggling with the error: > Invalid grant type for client: implicit Even though I have in my code...

Entity Framework Core: Fail to update Entity with nested value objects

I have an entity that has a value object and this value object has another value object. My issue is that when updating the entity along with the value objects, the entity with the parent value object...

Visual Studio 2017 only has offline Nuget Packages for .NET Core 2.x. How to get online packages?

I want to get NuGet Packages from Nuget online, but Visual Studio is only giving me 'Microsoft Visual Studio Offline Packages' as an option. [](https://i.stack.imgur.com/qGEWY.jpg) I have tried add...

23 May at 09:26

Casting sbyte[] to bool[] and a char[] to short[]

Is there anyway to explicitly cast/coerce - `sbyte[]``byte[]``bool[]`- `char[]``short[]``ushort[]` In CIL you regularly see something such as ``` stelem Type sbyte (ldloc pArray) ldc_i4 1 ldc_i4 ...

23 May at 11:42

What does own coverage mean in dotCover?

As the title says in some classes there's an line included as example: [](https://i.stack.imgur.com/hr5Hq.png) What does this mean?

23 May at 08:16

How to do model validation in every method in ASP.NET Core Web API?

I am getting into ASP.NET Core 2.0 with Web API. One of my first methods are my login: ``` /// <summary> /// API endpoint to login a user /// </summary> /// <param name="data">The login data</param> /...

error when url resource contains ampersand

We have a web api with the following resource url. ``` http://www.example.com/book/bookid/name/bookname ``` now there are some books which contains names with ampersand '&' and when a request is ma...

22 May at 20:6

Cancellation token in Lambda Function Handler C#

Does AWS Lambda Function Handlers in C# provide a cancellation token? I've read the documentation on AWS site ([https://docs.aws.amazon.com/lambda/latest/dg/dotnet-programming-model-handler-types.htm...

Use EventSystem for key-pressing events

Context: say you're checking whether "W" is pressed on the keyboard, the most common way to check this is through the following code: ``` void Update(){ if (Input.GetKeyDown("W")) DoSomet...

22 May at 15:21

How to update one Bezier curve as another is moved using a custom editor

I am creating Bézier curves using the code below which I got from [here](http://catlikecoding.com/unity/tutorials/curves-and-splines/). I have also made a `BezierPair` game object which has two Bézie...

4 Jun at 15:46

Redirect URI sent as HTTP and not HTTPS in app running HTTPS

I have an Asp .net core MVC app. Which connects to an Identity Server 4 for authentication. Hosted in a docker swarm MVC app is hosted on [https://XXXXXXX](https://XXXXXXX) ConfigurServies ```...

Enable native code debugging to deep into COM-object

I have some code that uses a 3rd-party lib (ArcObjects) exposed by COM. So for instance there´s the `IGeometry`-interface. ``` IGeometry geometry = GetGeometry(); ``` Now when I want to look at th...

31 Aug at 14:34

ActionFilter Response.StatusCode is always 200

I'm trying to setup an action filter that only does something if the `StatusCode` of the `HttpContext.Response` is 302. I would expect to be able to do this in the `OnActionExecuting` method, but the...

22 May at 10:35

Asp.Net Core 2.0 - Retrieve Image Url

I am trying to create a restful service that exposes some data, everything was just fine until I realize is a pain to expose images full URL from the server. Maybe it's just me but I am finding it ver...

22 May at 06:36

C# Web API Sending Body Data in HTTP Post REST Client

I need to send this HTTP Post Request: ``` POST https://webapi.com/baseurl/login Content-Type: application/json {"Password":"password", "AppVersion":"1", "AppComments":"", "UserName":"username"...

Accessing Async Property in Razor page

I am trying to bring up a simple .NET Core 2.0 Web Application with Razor pages. The page is connected to an equally simple Core 2.0 Web API. I have a simple class: ``` public class About : PageMode...

How should I get the length of an IEnumerable?

I was writing some code, and went to get the length of an IEnumerable. When I wrote `myEnumerable.Count()`, to my surprise, it did not compile. After reading [Difference between IEnumerable Count() ...

LINQ is Generating Extra IS NULL Condition in SQL Statement

I'm writing some LINQ to fetch records based on an email, however, the generated SQL contains an additional `IS NULL` condition which doesn't need to be there because I am checking the parameter value...

Explicitly defining flag combinations in an enum

I was thinking of implementing an enum that defines the state of a game object, and I wanted to know if I could directly use flags within the enum's definition, instead of defining the object's state ...

20 May at 21:12

EF core not creating tables on migrate method

Hey I just started using EF core and everything works fine. I call the the `context.Database.Migrate()` method and it creates a database. But even though my context object has a `DBSet<T>`, it doesn't...

How to use meshes with more than 64k vertices in Unity 2018.1

I've heard that Unity supports 32-bit index buffer now. But when I try Unity 2018.1 I can't make it work. I built meshes in code like this: ``` int nVertices = nx * ny; Vector3[] vertices = new ...

20 May at 15:9

How to use Roles in ASP.NET Core 2.1?

I've created a test project using: ``` dotnet new razor --auth Individual --output Test ``` This creates a Startup.cs that contains: ``` public void ConfigureServices(IServiceCollection services) ...

Cannot convert implicitly a type 'System.Linq.IQueryable' into 'Microsoft.EntityFrameworkCore.Query.IIncludableQueryable'

When I am developing my ASP.Net App, the following error was displayed. > Error CS0266 Cannot convert implicitly a type 'System.Linq.IQueryable' into 'Microsoft.EntityFrameworkCore.Query.IIncludabl...

12 May at 12:21

ServiceStack Plugin How to add MimeType for new file suffix, and allow the file suffix to be served?

I would like to add the file suffix ".wasm" to the AllowFileExtensions property of the AppHost, and I'd like to associate the MimeType "application/wasm" to that file suffix, so that a Windows service...

18 May at 22:3

SignalR dotnet core authentication

I am using [Microsoft.AspNetCore.SignalR](https://www.nuget.org/packages/Microsoft.AspNetCore.SignalR) nuget package with [Bazinga.AspNetCore.Authentication.Basic](https://www.nuget.org/packages/Bazin...

18 May at 14:39