How to read configuration values from AppSettings and inject the configuration to instances of interface

Just recently, I have been trying out the new asp.net features and came across this issue. I know that we can read the configuration as strongly typed instance. but i have no idea how can i inject the...

How to put a component inside another component in Angular2?

I'm new at Angular and I'm still trying to understand it. I've followed the course on the Microsoft Virtual Academy and it was great, but I found a little discrepancy between what they said and how my...

19 Apr at 11:26

How to allow access outside localhost

How can I allow access outside the localhost at Angular2? I can navigate at `localhost:3030/panel` easily but I can not navigate when I write my IP such as `10.123.14.12:3030/panel/`. Could you plea...

30 Jan at 13:23

.NET Core Microservice using RabbitMQ

I am planing to use Microservice architecture for a project. The selected technology stack is `.NET Core` with `Docker` and `RabbitMQ` as a simple service bus and this should be able to deploy on `Lin...

I can't get parameter names from valuetuple via reflection in c# 7.0

I want to Map a ValueTuple to a class using reflection. Documentation says that there is a Attribute attached to ValueTuple with parameters names (others than Item1, Item2, etc...) but I can't see any...

19 Apr at 07:28

Programmatically scrolling to the end of a ListView

I have a scrollable `ListView` where the number of items can change dynamically. Whenever a new item is added to the end of the list, I would like to programmatically scroll the `ListView` to the end....

How to extract interface from class in Visual Studio 2017

The functionality to extract an interface from a class (C#) seems to change in VS 2017. How can I do that in Visual Studio 2017.

19 Apr at 01:41

Is it possible to have NSwag ignore a controller?

I used NSwag to generate a client for a single controller; I needed it as its own separate client. I would like for it to be ignored when the Swagger specification is generated in the future. I trie...

18 Apr at 19:43

package.config update does not update the references

I have multiple projects referencing the same NuGet Package. When I got latest code, I realized that one of the projects had an updated package.config and also updated reference to the Dll that is pro...

How to Import a Single Lodash Function?

Using webpack, I'm trying to import [isEqual](https://lodash.com/docs/4.17.4#isEqual) since `lodash` seems to be importing everything. I've tried doing the following with no success: ``` import { isE...

15 Jan at 08:24

What do the underscores mean in a numeric literal in C#?

In the code below what is the significance of underscores: ``` public const long BillionsAndBillions = 100_000_000_000; ```

18 Apr at 15:16

How to use decimal type in MongoDB

How can I store decimals in MongoDB using the standard C# driver? It seems that all decimals are stored inside the database as strings.

18 Apr at 13:9

Facebook Oauth Servicestack not working

We have been using servicestack as framework for web services, we also uses its SSO with FB, LinkedIn, GooglePlus features. We enable them like this Plugins.Add(new AuthFeature(() => new AuthUserS...

Implement interface includes throw new NotImplementedException... why?

I'm using VS2017 Community and it just received an update yesterday. Today I wanted to implement an interface and now the implementation looks like this: ``` public string City { get => throw n...

18 Apr at 11:33

How to predict input image using trained model in Keras?

I trained a model to classify images from 2 classes and saved it using `model.save()`. Here is the code I used: ``` from keras.preprocessing.image import ImageDataGenerator from keras.models import Se...

ASP.NET Core This localhost page can’t be found

Does anyone encountered this kind of problem? I think it has something to do with the IIS or so... I am using IIS 10 also using VS2017 and ASP.NET Core. When I launch the application I saw this error:...

18 Apr at 09:50

Prerequisite to run C# apps that implements ServiceStack.Redis package

I am not sure if this is the right platform to ask this type of question, am just hoping that someone can enlighten me up on this. I am incorporating Redis in my C# app and was wondering if after publ...

18 Apr at 09:12

How to implement JWT Refresh Tokens in asp.net core web api (no 3rd party)?

I'm in the process of implementing a web api using asp.net core that is using JWT. I am not using a third party solution such as IdentityServer4 as I am trying to learn. I've gotten the JWT configura...

18 Apr at 15:55

Returning an Axios Promise from function

Can someone please explain why returning an Axios promise allows for further chaining, but returning after applying a `then()/catch()` method does not? Example: ``` const url = 'https://58f58f38c9de...

18 Apr at 05:12

How to overcome the CORS issue in ReactJS

I am trying to make an API call through Axios in my React Application. However, I am getting this CORS issue on my browser. I am wondering if i can resolve this issue from a client side as i dont have...

25 Jun at 19:44

Wait for a page to load with CefSharp

first and foremost I am a novice at C# and learning Cefsharp + javascript as I go so please attempt to comment any solution you feel are necessary, will save me asking stupid questions. I'm attemptin...

asp.net core testing controller with IStringLocalizer

I have controller with localization ``` public class HomeController : Controller { private readonly IStringLocalizer<HomeController> _localizer; public HomeController(IStringLocalizer<Home...

21 Jan at 18:37

How to create ASP.net identity tables in an already created database using code first?

My application has been in development for about a month. I now decided to use ASP.NET Identity. I already have the view models for identity but need to create the tables. I was thinking and I am not ...

Submitting multiple files to ASP.NET controller accepting an ICollection<IFormFile>

In my ASP.NET Core backend, I have a controller function that looks like this: ``` [HttpPost] [Route("documents/upload")] public async Task<IActionResult> UploadFile(ICollection<IFormFile> files) { ...

Authentication: JWT usage vs session

What is the advantage of using JWTs over sessions in situations like authentication? Is it used as a standalone approach or is it used in the session?

3 Dec at 18:32