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...
- Modified
- 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...
- Modified
- 6 Sep at 16:59
Call an action from within another action
I have the following setup for my actions: ``` get1: ({commit}) => { //things this.get2(); //this is my question! }, get2: ({commit}) => { //things }, ``` I want to be able to call one action f...
Newtonsoft.Json.JsonSerializationException (Error getting value from 'Value' on 'System.Data.SqlTypes.SqlDouble) serializing SqlGeography
I tried to serialize a `DataTable` object to Json using Newtonsoft.Json version 'Newtonsoft.Json.10.0.3' in a database SQL server 2012. The table has a column with type 'geography', which contains ...
- Modified
- 25 Aug at 16:23
How to delete all columns in DataFrame except certain ones?
Let's say I have a DataFrame that looks like this: ``` a b c d e f g 1 2 3 4 5 6 7 4 3 7 1 6 9 4 8 9 0 2 4 2 1 ``` How would I go about deleting every column besides `a` a...
Usage of Var Pattern in C# 7
I've seen this example of var pattern in the new C# 7 ``` if (o is var x) Console.WriteLine($"it's a var pattern with the type {x?.GetType()?.Name}"); ``` What is the different of just use: ``` va...
- Modified
- 23 Aug at 16:4
Meaning of "The server returned an invalid or unrecognized response" in HttpClient
When awaiting an `HttpClient.PostAsync` response, I sometimes see an error stating : ``` System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHtt...
ServiceStack + .NET Core + Kestrel = Swagger (OpenAPI) not working
I am trying to create a ServiceStack REST API project. So far I have everything working except Swagger (OpenAPI). When I load the Swagger UI it shows no APIs and I can see from the /openapi endpoint...
- Modified
- 23 Aug at 15:59
Custom IExceptionHandler
I'm trying to get a custom `IExceptionHandler` to work with my Azure Function (C# class library). The idea is to have my own exception handler for unexpected exceptions that will contain my own in-mem...
- Modified
- 22 Jun at 01:49
IDbCommand missing ExecuteReaderAsync
I'm using .NET Core 2.0. I've got the following function that calls `IDbCommand.ExecuteReader` ``` public async Task<IEnumerable<Widget>> ReadAllAsync( System.Data.IDbConnection databaseConnectio...
- Modified
- 23 Aug at 10:35
Display a readonly field in ASP.NET Core
I am new in ASP.NET Core and would like to ask about displaying a field in w a view. I have a ``` class Person { public string Name {get; set;} public string Nickname {get; set;} } ``` ...
- Modified
- 11 May at 23:0
How to check for the previous path searched on a maze C#
I am trying to code an algorithm that solves a maze problem but I am facing some difficulty to apply it correctly. The algorithm runs over the walls instead of changing the direction after finding t...
- Modified
- 25 Aug at 07:54
Can't inherit from IdentityUser and IdentityRole in ASP.NET Core 2.0
I'm trying to finish updating to .NET Core 2.0 but a couple of errors pop up: I have two classes, ApplicationRole and ApplicationUser which inherit some properties from IdentityRole and IdentityUse...
How to redirect to a asp.net core razor page (no routes)
Here I have a razor cs page: ``` public IActionResult OnPost(){ if (!ModelState.IsValid) { return Page(); } return RedirectToPage('Pages/index.cshtml'); } ``` And a cshtml page: ``` ...
- Modified
- 17 Oct at 22:15
Can Dapper create a model class from DB tables?
I'm looking over some alternatives to EF, and Dapper seems like a pretty good option. But I do have one question. I understand that Dapper, being a Micro ORM doesn't rely on or use a class of models, ...
- Modified
- 6 May at 20:44
How to add a filter to a page in serenity?
I'm trying to make a filter for a page in serenity. I have a page called Companies, and one button to open another page, CompanyUsers, users from this company. [](https://i.stack.imgur.com/ZquUS.png) ...
- Modified
- 20 Jun at 09:12
asp.net-core2.0 user auto logoff after 20-30 min
Few days ago I have decided to upgrade my web app from asp.net core 1.1 to core 2.0. Everything seems to work fine after minor changes, except authentication does not persist longer than 20-30 minutes...
- Modified
- 22 Aug at 22:28
Remove APK from library in Google Play Developer Console
Is there a way to remove an APK from the library in the Google Play Developer Console? To make sure: I don't mean to revert to an earlier version or unpublish an app, but to remove it from the list t...
- Modified
- 19 Jan at 14:14
How to listen to the window scroll event in a VueJS component?
I want to listen to the window scroll event in my Vue component. Here is what I tried so far: ``` <my-component v-on:scroll="scrollFunction"> ... </my-component> ``` With the `scrollFunction(ev...
- Modified
- 22 Aug at 21:17
ASP.NET Core 2.0 HttpSys Windows Authentication fails with Authorize attribute (InvalidOperationException: No authenticationScheme was specified)
I am trying to migrate an ASP.NET Core 1.1 application to ASP.NET Core 2.0. The application is fairly simple and involves the following: - - `options.Authentication.Schemes = AuthenticationSchemes...
- Modified
- 7 Sep at 14:12
Add class to an element in Angular 4
I was trying to create an image gallery with Angular 4.The logic behind this is to add a Cascading Style Sheet (CSS) class to the selected image that will show a red border on the selected (clicked) i...
Difference between the created and mounted events in Vue.js
Vue.js documentation describes the `created` and `mounted` events as follows: ``` created ``` > Called synchronously after the instance is created. At this stage, the instance has finished proces...
- Modified
- 22 Aug at 11:25
C# inline checked statement does not work
I have two test methods. The first one works fine. The second one does not throw an exception, but it should. Why doesn't the second one throw a exception? ``` [TestMethod] [ExpectedException(typeof(...
Cannot consume scoped service IMongoDbContext from singleton IActiveUsersService after upgrade to ASP.NET Core 2.0
I updated a project to ASP.NET Core 2 today and I get the following error: > Cannot consume scoped service IMongoDbContext from singleton IActiveUsersService I have the following registration: ``` ...
- Modified
- 22 Aug at 17:34
Working with return url in asp.net core
We are trying to redirect the user(using return URL) to the login page if the user is not authenticated/authorized while accessing the particular URL. However, we are not able to add the custom parame...
- Modified
- 22 Aug at 05:20