How to remove x-powered-by header in .net core 2.0

I tried to use this middleware: ``` public class SecurityHeadersMiddleware { private readonly RequestDelegate next; public SecurityHeadersMiddleware(RequestDelegate next) { this....

28 Aug at 02:32

ASP.NET Core - Add role claim to User

I've an ASP.NET Core (based on .NET Framework) using Windows Authentication. Point is, I need to add a role claim on that user and this role is stored in a distant database. I've read so much thing a...

ASP.NET Core localization decimal field dot and comma

I have a localized ASP.NET Core Web Application: en-US and it-IT. On en-US the decimal separator is dot, in it-IT the decimal separator is comma. I have this ViewModel ``` public class MyViewModel ...

25 Aug at 12:15

ef core doesn't use ASPNETCORE_ENVIRONMENT during update-database

I use visual studio to update all my environments with a certain migration. It had worked fine using the command below. ``` update-database -Migration initMigrationProduct -c ProductContext -Environme...

Only on Firefox "Loading failed for the <script> with source"

I want to integrate Marketo form with my existing website on yii framework. My code works on all the browsers except Firefox. Excerpt from my code: ``` $('#button').click(function () { var formD...

25 Oct at 13:35

How can I update a secret on Kubernetes when it is generated from a file?

I've created a secret using ``` kubectl create secret generic production-tls \ --from-file=./tls.key \ --from-file=./tls.crt ``` If I'd like to update the values - how can I do this?

ASP.NET Core 2.0 disable automatic challenge

After upgrading my ASP.NET Core project to 2.0, attempts to access protected endpoints no longer returns 401, but redirects to an (non-existing) endpoint in an attempt to let the user authenticate. T...

descriptor.ControllerDescriptor.ControllerName in AspNetCore.Mvc

I'm building an ASP.NET Core 2.0 Web Application. In ASP.NET WEB I used System.Web.Mvc where I had the following line to get the ControllerName: ``` descriptor.ControllerDescriptor.ControllerName ```...

25 Aug at 07:20

Error while reading json file in dotnet core "the configured user limit (128) on the number of inotify instances has been reached"

I have an console application (in dot net core 1.1) which is scheduled in cron scheduler for every 1 min. Inside the application there is call to configuration file. I'm attaching the code below. ``...

Will CLR check the whole inheritance chain to determine which virtual method to call?

The inheritance chain is as follows: ``` class A { public virtual void Foo() { Console.WriteLine("A's method"); } } class B:A { public overrid...

25 Aug at 00:42

Azure Service Bus Topics Multiple subscribers

I am new to Azure Service Bus and would like to know if I can multiple subscribers to a queue or topic? In rabbit MQ I can have multiple subscribers to 1 publisher. What I am trying to do is, I am u...

25 Aug at 00:37

Could not install package 'Microsoft.Extensions.DependencyInjection.Abstractions 2.0.0

I'm attempting to use Net Core in my mvc application for security policies. Articles I've read said I need to install DependencyInjection which I'm doing through NuGet in VS 2017. I'm getting the fol...

Before and After pseudo classes used with styled-components

What is the proper way to apply `:before` and `:after` pseudo classes to styled components? I know that you can use `&:hover {}` to apply the `:hover` pseudo class to a styled-component. Does th...

How to get docker toolbox to work with .net core 2.0 project

I'm getting an error trying to use the Docker functionality with my .NET core 2.0 project. I've been getting an error message saying > Visual Studio Container Tools requires Docker to be running bef...

Only allow `EncryptedMessage` for ServiceStack host

I am building a [ServiceStack](https://servicestack.net) service that runs on several dozen embedded devices. I'd like to ensure that all communication to the device occurs over an encrypted channel....

24 Aug at 15:4

JSON parse error: Can not construct instance of java.time.LocalDate: no String-argument constructor/factory method to deserialize from String value

I am new to Spring Data REST project and I am trying to create my first RESTful service. The task is simple, but I am stuck. I want to perform CRUD operations on a user data stored in an embedded dat...

Asp.net Core 2 API POST Objects are NULL?

I have a .net Core 2 API setup with some test function. (Visual Studio 2017) Using postman I do a post with the raw data to that method, but the model is just blank? Why? ``` // POST api/Product/tes...

24 Aug at 13:6

ASP.Net Core 1 Logging Error - The description for Event ID xxxx from source Application cannot be found

I would like to write to the Windows Event Log from an ASP.Net Core application's Controller method. The issue I have is that, where I expect log information to be written I keep getting the error/in...

31 Aug at 09:24

LocalDB is not supported on this Platform

I'm trying to launch `.Net Core 2.0` application on `Ubuntu 17.04`. I developed it on Windows 10 before and it works well. The problem is that when I run `dotnet ef database update` I get the next exc...

Exclude certain column from Entity Framework select statment

I have an image column in the product table in a SQL Server database. The image column is used to save the images as bytes. I know it is better to make a separate table for images, but I did not do t...

24 Aug at 10:19

Customize JSON property name for options in ASP.NET Core

I want to use different property names for configuration, when loading the configuration from a JSON file. ``` public class MinioConfiguration { [DataMember(Name = "MINIO_ENDPOINT")] public s...

24 Aug at 08:6

How can I use an ES6 import in Node.js?

I'm trying to get the hang of ES6 imports in Node.js and am trying to use the syntax provided in this example: ### Cheatsheet Link I'm looking through [the support table](http://node.green/), but I...

12 Oct at 19:39

Set color for each vertex in a triangle

I want to set each three vertex of a triangle from a mesh red, blue and green. As seen in the first part [this](https://codea.io/talk/discussion/3170/render-a-mesh-as-wireframe) tutorial which is for...

24 Aug at 06:5

Visual Studio Help - The "RunCommand" property is not defined

I'm using Microsoft Visual Studio Community 2017. I have created a project with multiple classes to be compiled. The primary class I want the application to run first has `public static void Main(stri...

24 Aug at 03:16

Configuration for console apps .net Core 2.0

In .net Core 1 we could do this: ``` IConfiguration config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", true, true) .Build(); ``` And that gave use...

6 Sep at 16:59