How to access IConfigurationRoot in startup on .net core 2?

I have written a custom `ConfigurationProvider` with the entity framework. Since I also want to make it updateable during runtime, I have created a [IWritableableOption](https://stackoverflow.com/a/42...

No bearer token or refresh token being returned in response, CORS suspected - ServiceStack

In my development environment, everything works fine. Going to staging, however, now we have different domains and CORS issues for sure, which I have fully resolved expect for potentially one issue. ...

22 Feb at 22:45

How should I convert a function returning a non-generic Task to ValueTask?

I'm working on some code which builds a buffer in memory and then empties it into a `TextWriter` when the buffer fills up. Most of the time, the character will go straight into the buffer (synchronous...

Access denied file in asp.net core

When i publish my project to `iis` and i do upload a picture on browser so this operation is fails and show this error in `logger sysytem` > An unhandled exception has occurred: Access to the path 'C:...

6 May at 20:41

Difference between .RunSynchronously() and GetAwaiter().GetResult()?

I'm trying to run an asynchronous task synchronously and was wondering what the differences between `.RunSynchronously()` and `GetAwaiter().GetResult()` were. I've seen a lot of comparisons between `...

22 Feb at 16:41

Why use C# async/await for CPU-bound tasks

I'm getting the hang of the async/await keywords in C#, and how they facilitate asynchronous programming - allowing the the thread to be used elsewhere whilst some I/O bound task like a db call is goi...

How to add clear button to TextField Widget

Is there a proper way to add a clear button to the `TextField`? Just like this picture from Material design guidelines: [](https://i.stack.imgur.com/nMAJn.png) What I found is to set a clear `Icon...

8 May at 06:16

Visual Studio: GlobalSuppressions.cs: Prefix ~P: for attribute Target in SuppressMessage

I suppressed several (IntelliSense) messages in Visual Studio 2017. I created entries in file `GlobalSuppressions.cs` like: ``` [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Wrong Usage...

19 Sep at 09:22

How Blazor Framework get notifed when the property value gets changed

When we have a HTML code like below. ``` <h1>@Title</h1> ``` and C# like below ``` public string Title { get; set; } ``` Think I have executed a code like below ``` Title = "New title updated i...

27 Aug at 05:36

Delete cookies in .net core 2.0

I am working on .Net Core 2.0 MVC Web Application. There is a need to manipulate authentication cookie to set expire time span based on user role. After the expire time span, the user will be logged o...

26 Nov at 17:11

Cypress: Test if element does not exist

I want to be able to click on a check box and test that an element is no longer in the DOM in Cypress. Can someone suggest how you do it? ``` // This is the Test when the checkbox is clicked and the e...

16 Dec at 00:12

Adding new authentication schemes dynamically

I'm building an ASP.Net Core 2 PoC for some authentication/authorization discussions/decisions that we need to make. I'm currently at a point where a user has just defined a new OpenID Provider that ...

21 Feb at 15:49

Equivalent of console.log in C#

I am running an MVC Web application built by using Visual Studio 2017. I want to test some parts of C# code `without using debugger breakpoints`. Is there any way to know a certain part of code has ru...

21 Feb at 10:32

How to Reference Microsoft.VisualBasic in a .Net Standard Class Library?

I am attempting to utilize some of the static classes in the `Microsoft.VisualBasic` name space in a .Net Standard 2.0 Class library (the `Financial.Rate` function specifically.) This is a C# project ...

21 Feb at 14:7

Equivalent of SqlFunctions in EF Core

What is the equivalent of `SqlFunctions` in Entity Framework (EF) Core 2.0? I am trying to convert this to EF Core ``` private static readonly MethodInfo StringConvertMethodDouble = typeof(SqlFuncti...

21 Feb at 05:59

What is the .vs folder used for in Visual Studio solutions?

What is the .vs folder used for exactly? It gets created at the base folder of my solution. I can see some hidden files and different files appear for different projects. I'm having a hard time chasin...

21 Feb at 02:16

Jenkins not restoring NuGet packages with new MSBuild restore target

We have a .net full framework WPF application that we've moved from along with changing to in the csproj file instead of packages.config. Building on the development machines appears to be fine and...

21 Feb at 00:46

How can I remove the debug banner in Flutter?

I'm using `flutter screenshot` and I expected the screenshot to not have a banner, but it has. Note that I get a `not supported for emulator` message for profile and release mode.

Visual Studio 2017 Localization Publish Settings

This should be simple, but I haven't found a way to make this stop happening. Visual Studio publishes a lot of localized DLLs - It appears there is German localization, Spanish localization, Italian l...

How do I log authorization attempts in .net core

I'm trying to write to a log when I person tries to access a method under an Authorize Attribute. Basically, I want to log if a person uses an invalid token or an expired token. I'm using basic Authen...

20 Feb at 17:37

Dynamic lambda expression with dynamic parameter

Given this class ``` public class Foo { public string Name { get; set; } } ``` This method (in some other class)... ``` private Func<Foo, string> Compile(string body) { ParameterExpression...

10 Apr at 06:23

Why do I get the error "expressions must have one parent element", how do I fix this?

I'm relatively new to React and I'm wondering what's the standard here. Imagine I have a react-router like this one: ``` <Router history={history}> <Route path="/" component={App}> <Route ...

17 Feb at 16:25

How to test .NET Standard 2 library with either NUnit, xUnit or MSTest from either Rider or VS 2017?

I have a project where I use [Azure Durable Functions](https://github.com/Azure/azure-functions-durable-extension), and they are available only on .NET Standard 2. So, it defines which class library c...

ModelState validation in Web Api when default formatter is servicestack

I have WEB.API controller which use attribute for modelstate validation, when I use default serializer of WEB API every thing works fine, but when I change it to servicestack required attribute for bo...

Force retesting or disable test caching

When I run the same go test twice the second run is not done at all. The results are the cached ones from the first run. ``` PASS ok tester/apitests (cached) ``` I already checked [...

20 Feb at 10:13