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...
- Modified
- 22 May at 17:13
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...
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...
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 ```...
- Modified
- 22 May at 12:59
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...
- Modified
- 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...
- Modified
- 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...
- Modified
- 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"...
- Modified
- 23 May at 01:54
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...
- Modified
- 21 May at 15:43
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() ...
- Modified
- 3 Jun at 06:1
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...
- Modified
- 22 May at 02:46
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 ...
- Modified
- 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...
- Modified
- 20 May at 16:19
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 ...
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) ...
- Modified
- 19 May at 15:13
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...
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...
- Modified
- 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...
- Modified
- 18 May at 14:39
Windows 10 Pro -version 1803 bluetooth Profiles Access
We are looking to access and use Bluetooth profiles in our WPF application using C# in Visual Studio 2017. Issue details: Platform: Windows 10 Pro - version 1803. Issue brief: We are trying to acce...
- Modified
- 18 May at 13:16
servicestack plugin to a Windows Service that will serve static files?
I've ServiceStack (V5.1.0) as a Windows Service, serving REST APIs, no problems. I would like to create a plugin that will serve static files from a specific physical directory, for any routes that st...
- Modified
- 18 May at 03:8
How to execute SqlQuery with Entity Framework Core 2.1?
In Entity Framework 6, I can execute a raw SQL query on the database using the following command: ``` IEnumerable<string> Contact.Database.SqlQuery<string>("SELECT a.title FROM a JOIN b ON b.Id = a.a...
- Modified
- 9 Dec at 18:22
Suppress a warning for all projects in Visual Studio
I've seen answers showing how to suppress a warning for a specific line of code or for a specific project. I don't want that. I want to suppress a specific warning for of my projects. (If it matter...
- Modified
- 20 Oct at 18:11
Setting UIaccess altering behavior of ShowDialog
I have a login prompt as part of a WPF application - when the user enters an incorrect password, a new modal dialog window appears informing them that their password is incorrect. This modal dialog is...
Performance Metrics/Diagnostics of .NET Tasks
Is there a way to get data out from .NET about the number of (C# 5 or newer, so post-async/await) Tasks pending execution, and similar metrics, for use in diagnosing issues happening to production ser...
- Modified
- 17 May at 18:28
Injecting Simple Injector components into IHostedService with ASP.NET Core 2.0
In ASP.NET Core 2.0, there is a way to add background tasks by implementing the `IHostedService` interface (see [https://learn.microsoft.com/en-us/aspnet/core/fundamentals/hosted-services?view=aspnetc...
- Modified
- 17 Jun at 12:21