How to add ASP.Net identity to Asp.Net Core when webApi template is selected?

I have created a .NET Core project with WebApi template selected includes no authentication. I want to add ASP.NET identity in it for role based authorization. How can I achieve this?

Building ServiceStack.Core for open-source project

We are developing an Open-Source aPaaS product. The project is in its very early stage. We use .NETCore, for Web Services, we want to use ServiceStack. For now, we are using NuGet packages. But, the...

11 Jun at 03:47

Assembly 'Microsoft.SqlServer.Types' version 10 or higher could not be found

I Have a problem. I'm not able to add a Migration to my ASP.NET WebAPI 2 Project. I get error: > "Spatial types and functions are not available for this provider because the assembly 'Microsoft.Sq...

OAuth2 authorization implementation in ServiceStack

I am researching on OAuth2 authorization service implementation for our website. We have WebServices implementation in ServiceStack with customAuthentication along with FB, LinkedIn AuthProviders ena...

Tracking Down a .NET Windows Service Memory Leak

Before installing my windows service in production, I was looking for reliable tests that I can perform to make sure my code doesn't contain memory leaks. However, All what I can find on the net was u...

25 Apr at 18:45

Laravel - htmlspecialchars() expects parameter 1 to be string, object given

I go this error: ``` htmlspecialchars() expects parameter 1 to be string, object given ``` I'm using in controller: ``` $data = '{"pr":{"code":"1"},"ac":[[{"icon":"web","action":"link","url":"asd...

4 Apr at 21:18

ServiceStack OrmLite: Table field type when create table form c#

I need create table field when type "Text". ``` public class PropsTable { public string PropKey { get; set; } public string PropValue { get; set; } } .... db.CreateTableIfNotExists<Pro...

String to character array returning different result in Visual Studio and Android Studio

The string that I want to convert into character array is ষ্টোর it is in Unicode and a Bengali word. The problem is when I am converting it in then it is returning but when I am converting it in t...

Moving file using cmd?

I have a file that I have downloaded from Google (it is inside the download folder) and I want to move it to the autorun folder ( The folder where files run when the computer turns on). I need to mov...

5 Apr at 08:59

How to get query parameters in react-router v4

I'm using react-router-dom 4.0.0-beta.6 in my project. I have a code like following: ``` <Route exact path="/home" component={HomePage}/> ``` And I want to get query params in `HomePage` component....

Running Tensorflow in Jupyter Notebook

I am trying to do some deep learning work. For this, I first installed all the packages for deep learning in my Python environment. Here is what I did. In Anaconda, I created an environment called...

C# HttpClient adding "User-Agent" header shows up as several different headers

When adding a "User-Agent" header to `HttpClient` it shows up as several User-Agent headers instead in the request. It seems as the string added as User-Agent breaks upon a space character by default ...

4 Apr at 19:0

How to display custom values on a bar plot

I'm looking to see how to do two things in Seaborn with using a bar chart to display values that are in the dataframe, but not in the graph. 1. I'm looking to display the values of one field in a dat...

How do I supply an initial value to a text field?

I'd like to supply an initial value to a text field and redraw it with an empty value to clear the text. What's the best approach to do that with Flutter's APIs?

1 Apr at 07:26

pgadmin4 : postgresql application server could not be contacted.

I have installed PostgreSQL 9.6.2 on my Windows 8.1. But the pgadmin4 is not able to contact the local server. I have tried several solutions suggested here in stackoverflow, tried to uninstall and re...

4 Apr at 15:18

Is it possible to bind to a ValueTuple field in WPF with C#7

If I have a viewmodel property ``` public (string Mdf, string MdfPath) MachineDefinition { get; set; } ``` and I try to bind to it in XAML / WPF ``` <Label Content="{Binding Path=MachineDefinition...

4 Apr at 13:36

Is there an in memory job storage package for Hangfire?

I have a console application to test HangFire. Here is the code: ``` using System; using Hangfire; namespace MyScheduler.ConsoleApp { internal static class Program { internal stati...

4 Apr at 14:1

How to get webDriver to wait for page to load (C# Selenium project)

I've started a Selenium project in C#. Trying to wait for page to finish loading up and only afterwards proceed to next action. My code looks like this: ``` loginPage.GoToLoginPage(); loginP...

Include filter child collection

I have some difficulty to add some filter condition for included items in my LINQ query. My query is like ``` var item = _Context.Order.Include("Inner") .Include("Inner.first") ....

How to throw error from RxJS map operator (angular)

I want to throw an error from my observable's operator based on a condition. For instance if correct API data is not received. Please see the following code: ``` private userAuthenticate( email: stri...

27 Oct at 02:36

How to concatenate two layers in keras?

I have an example of a neural network with two layers. The first layer takes two arguments and has one output. The second should take one argument as result of the first layer and one additional argum...

ASP Core Cannot Set User Secrets in VS 2017

With visual studio 2017, when I try to set a user secret I get the following error: ``` > dotnet user-secrets set Authentication:Google:ClientId mysecretclientid > Could not find the global property ...

How to get row number in dataframe in Pandas?

How can I get the number of the row in a dataframe that contains a certain value in a certain column using Pandas? For example, I have the following dataframe: ``` ClientID LastName 0 34 J...

3 Apr at 20:42

Hibernate Error executing DDL via JDBC Statement

I really need help I searched in all the questions I found on stackoverflow and nothing works. I have never used hibernate before and I don't know what I am doing wrong. Here is my repository: [https:...

3 Apr at 18:8

How can I add space between Bootstrap card elements?

I'm trying to add space between the two card decks. I'm using bootstrap 4 alpha 6. I've no idea why using `mt-20` on the second card deck wont do it. I've tried wrapping them in rows and doing it, but...

8 Dec at 15:20