Questions

How can I get a list of registered middleware in ASP.NET Core?

In ASP.NET Core, you can register new middleware into the request processing pipeline during the `Configure` method of the startup class you're using for your web host builder by using `app.UseMiddlew...

20 Aug at 11:1

How to skip a test case which has Theory attribute not Fact

How to skip a data driven test case for some reason? I can skip a test case with Fact but getting an exception when using skip for parametrized test cases. Exception: Xunit.SkipException: 'Exception...

27 Jun at 16:7

What does the attribute "[ApiExplorerSettings(IgnoreApi = true)]" do?

I'm aware of what attributes in general do, the question is for this specific attribute alone. Sorry for the confusion! I've read the following [question](https://stackoverflow.com/questions/2795172...

20 Aug at 16:49

Build Errors in Visual Studio 2019 inconsistently show up in Error List

I recently updated from Visual Studio 2017 Community Edition to Visual Studio 2019 Community Edition. Now, if I build my solution with errors, they will show up in the build output, but not all of th...

19 Aug at 04:7

ServiceStack.Aws.DynamoDb: Is there async APIs?

[ServiceStack](https://servicestack.net) is a great library, and I'm now considering using it also for working with [AWS DynamoDb](https://aws.amazon.com/dynamodb/). However, the only async APIs I ca...

C# performance profiler shows long pause, unable to determine what it is from the data provided

I am getting an unexpected spike in my C# application when rendering frames. I have been going over it in a profiler and I noticed the following: - [](https://i.stack.imgur.com/q4Qtl.png) - [](h...

18 Aug at 20:40

Blazor Textfield Oninput User Typing Delay

How can I add a delay to an event (OnInput) in Blazor ?For example, if a user is typing in the text field and you want to wait until the user has finished typing. Blazor.Templates::3.0.0-preview8.1940...

Enable CORS for any port on localhost

in asp.net core i can use middleware to enable CORS on certain methods as [described here](https://learn.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-2.2) i want to know if its poss...

17 Aug at 21:6

"The attribute names could not be inferred from bind attribute 'bind-value'" error in Blazor

I've just migrated a Blazor project from Core 3 Preview 6 to Preview 8 and I'm now getting this error: > The attribute names could not be inferred from bind attribute 'bind-value'. Bind attributes ...

20 May at 07:39

ServiceStack how to use MaxLoginAttempts feature

I tried to add the MaxLoginAttempts feature in my ServiceStack project. But it is still allowing login attempts after 5 unsuccessful login attempts. I'm not sure to know what is missing in my code. A...

16 Aug at 16:7

Visual Studio 2019 and AWS: "not a supported code page" when doing a .NET Core 2.1 project

I created a template project for ServiceStack using the answer [here](https://stackoverflow.com/a/57511810/178143), basically creating a .NET Core 2.1 project. When I used the "Publish to AWS Elastic...

How to turn on CircuitOptions.DetailedErrors?

I'm getting this message in the console when running a server-side Blazor app: > Error: There was an unhandled exception on the current circuit, so this circuit will be terminated. For more details...

ServiceStack and AWS: Created a ASP.NET Empty project, but cannot select .NET Core in target framework

I started a ServiceStack ASP.NET Empty project in VS2019, as that was the closest thing I could find to what I wanted. The template is right on, but I want to run it in .NET Core. However, the Target...

Use Windows Forms in a .Net Core Class Library - .NET Core Control Library

I am trying to create a .net core 3 class library that references the .net core 3 version of winform (so this assembly can itself be referenced by a .net core 3 WinForm assembly). A new .net core Win...

1 Dec at 12:33

200 on a token expiry - correct?

I have written an implementation of a JWT based authorizer. If there is no JWT, it works as expected and throws a 401. I have a custom provider which is based off of : ``` AuthProvider, IAuthWithRe...

15 Aug at 12:36

Difference between Threading.Volatile.Read(Int64) and Threading.Interlocked.Read(Int64)?

What is the difference, if any, of the `Read(Int64)` method of the .NET system classes [System.Threading.Volatile](https://learn.microsoft.com/en-us/dotnet/api/system.threading.volatile.read?view=netf...

Why 0/0 is NaN but 0/0.00 isn't

Using `DataTable.Compute`, and have built some cases to test: ``` dt.Compute("0/0", null); //returns NaN when converted to double dt.Compute("0/0.00", null); //results in DivideByZero exception ``` ...

15 Aug at 08:35

TestServer returns 404 not found

I'm using aspnetcore 3.0 preview 7 for my web api project. Currently I'm implementing the integration tests. (To make the tests easier first, I commented out the Authorize attribute on the controllers...

What is the difference between .js and .mjs files?

I have started working on an existing project based on Node.js. I was just trying to understand the flow of execution, where I encountered with some `*.mjs` files. I have searched the web where I foun...

11 Oct at 19:48

What is the differece between a 'Use Case Interactor' and a 'Service' in Clean Architecture?

I don't really understand the difference between a and a in Clean Architecture. Is a domain service just a collection of "Use Case Interactor methods"? I want to implement the clean architecture in...

How to manage separation of concerns when using ServiceStack AutoQuery

I am having some issues with how to organise my AutoQuery code. My project structure currently looks like: ``` /Project /Project.ServiceInterface Service.cs /Project.Logic Manager.cs /Types ...

14 Aug at 04:43

Authorization in ASP .NET Core Razor pages

I am unable to implement policy-based authorization in ASP .NET Core for an action on a razor page. I read through [this comprehensive document on authorization](https://learn.microsoft.com/en-us/asp...

13 Aug at 12:35

Visual studio 2019 go to definition and Intellisense not working

I have noticed a weird issue with Visual Studio 2019 v16.0.1 the IntelliSense about "Using directive is unnecessary" normally grey is missing and type reference suggestion for missing using is not wor...

When does IDE0063 dispose?

I'm trying to understand this C# 8 simplification feature: > IDE0063 'using' statement can be simplified For example, I have: ``` void Method() { using (var client = new Client()) { ...

12 Aug at 14:24

ServiceStack ServiceStack.Auth.OrmLiteAuthRepository

All of a sudden I got the following error message when I try to run my web application. "Method 'GetRolesAndPermissions' in type 'ServiceStack.Auth.OrmLiteAuthRepository`2' from assembly 'ServiceStack...

12 Aug at 09:0