How to add an item to an ArrayList in Kotlin?
How to add an item to an `ArrayList` in Kotlin?
- Modified
- 17 Jun at 11:33
kubectl unable to connect to server: x509: certificate signed by unknown authority
i'm getting an error when running kubectl one one machine (windows) the k8s cluster is running on CentOs 7 kubernetes cluster 1.7 master, worker Here's my .kube\config ``` apiVersion: v1 clusters: ...
- Modified
- 15 Sep at 07:42
accessing appsetting.json values in startup.cs
I understand how to Configure services for appsettings.json and inject them into a controller. However, I need to use the values in the ConfigureServices when I configure Auth. How would I do this? ...
- Modified
- 15 Sep at 01:59
how to impersonate a user via odata
We have been succesful in using the odata v8.1 endpoint in 2016 to [impersonate a user.](https://msdn.microsoft.com/en-us/library/gg334744.aspx) Please note that the intended request flow is: Exam...
- Modified
- 15 May at 20:57
How to set up the DbContext in xUnit test project properly?
I have the following code to set up DBContext in the .Net core 2.0 console program and it's injected to the constructor of the main application class. ``` IConfigurationRoot configuration = GetConfig...
- Modified
- 14 Sep at 20:59
JSON.stringify (Javascript) and json.dumps (Python) not equivalent on a list?
In javascript: ``` var myarray = [2, 3]; var json_myarray = JSON.stringify(myarray) // '[2,3]' ``` But in Python: ``` import json mylist = [2, 3] json_mylist = json.dumps(mylist) # '[2, 3]' <-- Note...
- Modified
- 18 Nov at 12:32
Custom IUserAuthRepository with Servicestack
I'm in the process of trying to set up a server for a personal project. I'm using ServiceStack.Core with a Neo4j graph database as my persistence layer. I would like to set up user authentication usi...
- Modified
- 14 Sep at 17:2
ASP.NET Core 2 AuthenticationSchemes
There are several authentication schemes but I can't find any documentation on them. How do they differ? ```csharp options.DefaultScheme options.DefaultChallengeScheme options.DefaultForbidSchem...
- Modified
- 2 May at 02:48
C# HttpClient An existing connection was forcibly closed by the remote host
I'm working on an integration with Alternative Payments using their [hosted page integration](http://www.alternativepayments.com/developers/API/?shell#create-transaction). Their C# SDK does not have t...
- Modified
- 1 Aug at 14:47
ASP.NET Core 2 Seed Database
I've seen some of the similar examples on SO regarding this but I don't know enough about the language just yet to see what I'm doing wrong. I've cobbled together a demo to learn more but I'm having t...
- Modified
- 20 Jun at 09:12
What is the point of having async Main?
As we know, C#7 allows to make Main() function asynchronous. What advantages it gives? For what purpose may you use async Main instead of a normal one?
- Modified
- 14 Sep at 12:26
groupname doesn't work in more than one radiobutton inside repeater asp.net
I have a repeater and inside the repeater a radiobutton control, in code behind I fill the groupname for the radiobutton control, so, when I run it, I have a table with many rows and some of them have...
- Modified
- 14 Sep at 11:50
Property does not exist on type 'DetailedHTMLProps, HTMLDivElement>' with React 16
Since React 16 now allows [custom DOM attributes](https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html), I tried to leverage this in my Typescript code: ``` import * as Re...
- Modified
- 14 Sep at 09:45
Iterate over array of objects in Typescript
I need to iterate over the array of objects in angular 2 and limit the string length display for a particular key in the object. ``` this.productService.loadAllProducts(product).subscribe(data => { ...
- Modified
- 21 Jul at 15:22
Implementing JSON Merge Patch in ASP.NET Core WebAPI
I am interested in adding support for partial updates in my ASP.NET Core WebAPI where I only update the properties on a resource that the caller provided, leaving excluded properties unchanged. For co...
- Modified
- 7 Oct at 07:59
What is .AspNetCore.Antiforgery.xxxxxxx cookie in .Net Core?
I was trying to use ValidateAntiForgeryToken in .Net Core but I was getting .AspNetCore.Antiforgery.xxxxxxx cookie is missing. What is this .AspNetCore.Antiforgery.xxxxxxx cookie?
- Modified
- 13 Sep at 23:57
How to properly use user registration in ServiceStack
I am new to ServiceStack and I am having some problems truly understanding the user registration stuff. Our goal is to: 1. Allow a user to create a new account 2. Verify if a user name and/or email ...
- Modified
- 13 Sep at 20:32
Dependencies not flowing between dependent projects, causing System.IO.FileNotFoundException
Let's say my solution has 2 projects: - - The first project (MainProject) has a NuGet dependency called "dependencyX". Obviously, the project "MainProjectTests" has a reference to "MainProject". S...
- Modified
- 4 Jul at 19:0
EF Core Migrations with Multiple DB Schemas
EF Core 1.1 and SQL Server 2016 We are running a microservice application with some microservices having independent few tables. One of the solutions to have many tables for individual microservice, ...
- Modified
- 13 Sep at 19:40
How to refresh an Entity Framework Core DBContext?
When my table is updated by another party, the db context in dotnet core still return the old value, how can I force the Db context to refresh? I've done research but I only found people use `Reload`...
- Modified
- 13 Sep at 19:25
First time exception - System.pdb not loaded
I use VS2017 and I get the following when I hit F5 [](https://i.stack.imgur.com/vnY2E.png) It happens for certain projects only, even if I disabled the Symbols support under VS options. Although in ...
- Modified
- 13 Sep at 16:34
How to Auto size Excel ClosedXml cells in c#
I am trying to resize cells so that it fits the maximum length of the text using `ClosedXMl.Excel` but the cell is giving me this error message: > Severity Code Description Project File Line Suppressi...
How to set the culture in a dotnetcore xunit test
I have the following unit test that I'm porting from a .Net Framework library to .Net core xunint test library. The project the unit test needs to be added to is [https://github.com/dotliquid/dotliqu...
- Modified
- 13 Sep at 13:59
Why does C# support abstract overrides of abstract members?
Whilst browsing through some legacy code, I was surprised to encounter an Basically, something like this: ``` public abstract class A { public abstract void DoStuff(); } public abstract cla...
Resolve IStringLocalizer with real resx manually
I am looking for a way to resolve `IStringLocalizer` objects with the real underlying resx files, using a similar method to how I resolved `IOptions` in [this question][1]. This is in order to build u...