How to map config in IConfigurationSection to a simple class
Using MVC .net Core and building a concrete config class within the startup class. My appsettings.json looks like this: ``` { "myconfig": { "other2": "tester, "other": "tester", "root"...
- Modified
- 28 Nov at 13:47
Access is denied despite using broadFileSystemAccess
UWP is killing me..... I had to reinstall VisualStudio2017 after a computer crash. And now, my app that was working perfectly well before the crash refuses to work. I've been using the broadFileSyst...
Why do I keep getting "[eslint] Delete `CR` [prettier/prettier]"?
I am using VS Code with Prettier 1.7.2 and ESLint 1.7.0. After every newline I get: ``` [eslint] Delete `CR` [prettier/prettier] ``` This is the `.eslintrc.json`: ``` { "extends": ["airbnb", "plugi...
- Modified
- 26 Oct at 17:1
What is an correct way to inject db context to Hangfire Recurring job?
I'm using HangFire to send emails to users in the background, regularly. I'm obtaining email addresses from database, but I'm not sure whether I'm "injecting" database context to service that's respo...
- Modified
- 28 Nov at 08:42
Configure AspNetCore TestServer to return 500 instead of throwing exception
I am developing a Web API that in some cases will respond with 500 (ugly design, I know, but can't do anything about it). In tests there's an ApiFixture that contains AspNetCore.TestHost: ``` public ...
- Modified
- 28 Nov at 09:11
The Current .Net SDK does not support targeting .Net Core 2.2 Target .Net Core 2.1 or Lower
I have some projects in the preview version of .net core 2.2 preview 3. It was working fine until i updated my VS Studio Community Edition to Version 15.9.2. After that targeting .net core 2.2 preview...
- Modified
- 28 Nov at 07:3
Flutter Network Image does not fit in Circular Avatar
I am trying to retrieve bunch of images from an api. I want the images to be displayed in Circular form so I am using `CircleAvatar` Widget, but I keep getting images in square format. Here is a scre...
- Modified
- 28 Nov at 06:33
JavaScript fetch - Failed to execute 'json' on 'Response': body stream is locked
When the request status is greater than 400(I have tried 400, 423, 429 states), fetch cannot read the returned json content. The following error is displayed in the browser console > Uncaught (in pro...
- Modified
- 13 May at 04:47
Mocking CloudStorageAccount and CloudTable for Azure table storage
So I am trying to test Azure Table Storage and mock things that I depend on. My class is structured in a way that I establish a connection in the constructor, i.e. I create a new instance of `CloudSto...
- Modified
- 28 Jul at 20:22
Call async method on UI thread
I'm trying to create WPF client with authentication. I'm using their `OidcClient` to get logged in. It's whole async while my app is sync and can't be refactored without huge effort. Calling ``` var...
- Modified
- 27 Nov at 21:8
Invalid value for the configfile paramter of the generationapplication manifest task
I have an issue when i want to publish a project i receive the error message "obj\debug\project.exe.config;obj\Debug\project.exe.config"is an invalid value for the "ConfigFile" parameter of the "Ge...
Entity Framework Core Auto Generated guid
Can some One guide me I want `primeryKey` of a table as `guid` having db generated value on insert. ``` [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Guid Id { get; set; } ``` bu...
- Modified
- 2 Sep at 22:16
Why does a property inherited from an interface become virtual?
Say I have one interface and two classes, and one of the classes implement this interface: ``` interface IAAA { int F1 { get; set; } } class AAA1 { public int F1 { get; set; } public int...
- Modified
- 27 Nov at 13:48
Create text file and download without saving on server in ASP.net Core MVC 2.1
I've found a way to create a text file then instantly download it in the browser without writing it to the server in regular ASP.net: [Create text file and download](https://stackoverflow.com/questio...
- Modified
- 27 Nov at 00:26
ASP.NET Core 2.1 cookie authentication appears to have server affinity
I'm developing an application in ASP.NET Core 2.1, and running it on a Kubernetes cluster. I've implemented authentication using OpenIDConnect, using Auth0 as my provider. This all works fine. Action...
- Modified
- 26 Nov at 23:33
Numpy, multiply array with scalar
Is it possible to use ufuncs [https://docs.scipy.org/doc/numpy/reference/ufuncs.html](https://docs.scipy.org/doc/numpy/reference/ufuncs.html) In order to map function to array (1D and / or 2D) and sca...
- Modified
- 26 Nov at 16:25
MissingMethodException Global.asax.cs
Because of this blog-post: [https://www.radenkozec.com/8-ways-improve-asp-net-web-api-performance/](https://www.radenkozec.com/8-ways-improve-asp-net-web-api-performance/) I´ve tried to replace JSON.n...
- Modified
- 20 Jun at 09:12
ASP.NET Core Api-Gateway middleware
I am new to API gateways and have a question of understanding. I try too put a series of (micro)services behind an endpoint. For this purpose, I have set up an ASP.NET Core Application and added the ...
- Modified
- 26 Nov at 09:11
MySQL Workbench reports "is not valid at this position for this server version" error
For the following SQL query: ``` SELECT COUNT (distinct first_name) from actor; ``` I receive the following error message: ``` "SELECT" is not valid at this position for this server version, expec...
- Modified
- 26 Nov at 03:13
Difference between DbSet<T> property and Set<T>() function in EF Core?
Given this kind of context: ``` public class FooContext : DbContext { public FooContext(DbContextOptions<FooContext> opts) : base(opts) { } public DbSet<Bar> Bars { get; set; } } ``` ...
- Modified
- 25 Nov at 16:26
.NET Core equivalent to Thread.Abort
## Background I have a `Service` abstraction. Each service has it own `WorkItem`. WorkItem able to start with some data. The service is limiting the excution time of `WorkItem`. Let's say that a si...
- Modified
- 18 Feb at 10:30
How to use componentWillMount() in React Hooks?
In the official docs of React it mentions - > If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWillU...
- Modified
- 25 Nov at 04:13
Why is 2 * (i * i) faster than 2 * i * i in Java?
The following Java program takes on average between 0.50 secs and 0.55 secs to run: ``` public static void main(String[] args) { long startTime = System.nanoTime(); int n = 0; for (int i =...
- Modified
- 16 Jul at 13:14
SqlExpression Creating Upper SQL Query
I have the following code: ``` SqlExpression<Postcodes> sqlExpression = db.From<Postcodes>() .Where(x => x.CityId.StartsWith(searchString)) .OrderBy(x => x.Cit...
- Modified
- 23 Nov at 11:48
Joining same table multiple times in ServiceStack.OrmLite
When joining a table to itself, the sql statment generated does not reference the tables correctly. It's working when the "main" table is different from the joining table [https://github.com/Service...
- Modified
- 22 Nov at 22:54