How to make JWT token authorization optional in controller methods

I use JWT tokens in my ASP.NET Core 2 web application If the JWT token fails I still want the controller method to be hit but the ASP.NET Identity `User` object will just be null. Currently the contr...

ServiceStack: Custom login method and create manual IAuthSession for use with [Authenticate] attribute?

I'm trying to manually create an IAuthSession and saving it, so I can use the attribute [Authenticate] on my methods, but doesn't seem to work. So, I have my `LoginHandler : Service` where I do some c...

7 Dec at 15:19

How to serialize JSON to string without escape characters in .NET Core?

I would like to serialize a C# object to JSON in a string from .NET Core. I have tried with this code, but it results in a string with escape characters for the quotes: This is the resulting string: H...

16 May at 18:37

Why can't C# infer the type of a DataTable Row

I am trying to iterate over a DataTable and get the values from a particular column. So far I just have the Skeleton of the for loop. This does not work as I expected. I get an compiler error when try...

5 May at 14:59

flutter - correct way to create a box that starts at minHeight, grows to maxHeight

I have a container that I want to start off at a minimum size and grow (if its contents grow while user is adding content) to a maximum size, then stop. The correct widget for this seems to be Constr...

8 Feb at 00:52

Trying to set-up Entity Framework core in .Net Standard project

I was wondering if I could set-up my EntityFrameworkCore in a .NET Standard 2.0 project easily. I was following this [Tutorial](https://learn.microsoft.com/en-us/ef/core/get-started/aspnetcore/existin...

Extending the UserManager

In my .NET Core 2.0 MVC project I added additional values to extend the ApplicationUser ``` public class ApplicationUser : IdentityUser { public string Name { get; set; } public D...

4 Feb at 09:50

ASP.NET Core returns 404 instead of 500 when using ExceptionHandler PipeLine

I have this controller ``` [Route("api/[controller]")] public class ValuesController : Controller { // GET api/values [HttpGet] public IEnumerable<string> Get() { Console.Writ...

7 Feb at 15:55

Can't read app.config in C# .NET Core unit test project with ConfigurationManager

I've created a simple unit test project to read an app.config file. Target framework is Core 2.0. I also created a Core 2.0 console app, to sanity-check myself to make sure I wasn't doing anything wei...

How do I resume a MongoDB ChangeStream at the first document and not just changes after I start listening

My goal for this app is to create logic that monitors the database and will trigger actions when a document is added to the database (like sending an email). However, since this application may not b...

How to use GlobalRequestFilters in ServiceStack? It doesn't seem to be fired

I want a customer authentication flow and I just want to decorate the Requests with [Authenticate] to block some of the secured ones. To check if they are authenticated, I wanna basically just lookup ...

9 Jul at 10:12

"Abstract" interface in C#

There is arguably an X-Y problem it, which I may post separately later. But I actually specifically interested in the Academic Question, here. --- I often find that I have groups of interfaces...

7 Feb at 12:32

Application Insights not tracking exceptions when used in ServiceStack application

I currently have a problem where App Insights isn't showing the exceptions in .Net Core. I am also using ServiceStackCore to build my API. This is what it currently looks like in the Azure portal und...

Xunit - disable parallelism in few tests of full set

(those 2 test cannot be parallel, because they need to simulate keyboard clicking -> so I would lose input focus using parallel execution) Add some attribute to 2 tests that will disable para...

4 Feb at 09:7

Blazor vs Razor

With the invention of Blazor, I'm wondering if there are significant efficiencies (both in creation of code and in the actual compilation / execution of code) between these two languages? [https://gi...

11 May at 22:18

Angular-Material DateTime Picker Component?

I imported a [date picker](https://material.angular.io/components/datepicker/overview) in a project and was wondering if there was any official recent component from angular and material to include ti...

Application Variables in ASP.NET Core 2.0

How would I go about setting and accessing application-wide variables in ASP.NET Core 2.0? I have a variable, let's call it CompanyName, which resides in the database and is used on literally every...

Find difference between two data frames

I have two data frames df1 and df2, where df2 is a subset of df1. How do I get a new data frame (df3) which is the difference between the two data frames? In other word, a data frame that has all the...

18 Nov at 14:0

Extracting specific columns from pandas.dataframe

I'm trying to use python to read my csv file extract specific columns to a `pandas.dataframe` and show that dataframe. However, I don't see the data frame, I receive Series([], dtype: object) as an ou...

6 Feb at 11:29

Hosting Servicestack with .net Core

My solution has two project: Lib project => .Net standard 2.0, with TestApp class implement AppHostBase Host project => .Net Core 2.0. With program class like below: ``` var listeningOn = args.Leng...

6 Feb at 07:13

Regex for default ASP.NET Core Identity Password

: This question, I believe, is not the duplicate of this [question](https://stackoverflow.com/questions/48345922). My question is dealing with the default validation rules asp.net core identity has fo...

Route Name for HttpGet attribute Name for base generic controller class in asp.net core 2

I have a generic controller, which have several derived controller classes. but I cannot figure out how to handle the HttpGet's since it require constant. ``` [HttpGet("{id}", Name ="should not hard...

Retrieving All items in a table with DynamoDB

I am currently in a web services class, and for the project I am working on, I decided to make a Web API using the .NET Core platform, with DynamoDB as the Database. So far it has been a little tough...

Calling a SOAP service in .net Core

I´m porting a .net 4.6.2 code to a , that calls a SOAP service. In the new code I´m using C# (because of some config reasons I just can´t remember why right now). But I´m getting the following except...

8 Feb at 09:47

How is Progress<T> different from Action<T> ? (C#)

I've been using `Progress<T>` and wondered if it can be replaced by `Action<T>`. In the code below, using each of them for reporting progress, i.e. `ReportWithProgress()` or `ReportWithAction()`, did...

5 Feb at 14:48