Questions

is HttpContext async safe in asp.net core?

Based on what i have read `asp.net core` have dropped the synchronization context. This means that the thread that executes codes after `await` call might not be the same one that executes codes befor...

9 Sep at 21:58

How can I use the Microsoft Edge WebView2 control in C# windows application

How can I use the Microsoft Edge WebView2 control in C# windows application using Visual Studio?

22 May at 04:16

React warning Maximum update depth exceeded

This is a follow up question to this question which is the nearest to my issue: [Infinite loop in useEffect](https://stackoverflow.com/questions/53070970/infinite-loop-in-useeffect) I am creating a ...

9 Sep at 11:39

Using async/await inside a React functional component

I'm just beginning to use React for a project, and am really struggling with incorporating async/await functionality into one of my components. I have an asynchronous function called `fetchKey` that...

What are the differences between app.UseRouting() and app.UseEndPoints()?

As I'm trying to understand them, It seem like they are both used to route/map the request to a certain endpoint

7 Feb at 13:3

How do I write Blazor HTML code inside the @code block?

How can I write Blazor HTML code within a function inside of the `@code` block? Consider the following code: ``` @page "/Test" @if (option == 1) { drawSomething("Something"); } else { drawS...

8 Sep at 07:25

NavigationDuplicated Navigating to current location ("/search") is not allowed

When I want to do a search multiple times it shows me the `NavigationDuplicated` error. My search is in the navbar and the way I have configured the search is to take the value using a model and then ...

30 Mar at 12:11

ServiceStack and Kestrel: Using the .Map function to route to ServiceStack instances based on path (middleware)?

We are looking into .NET Core and Kestrel and using ServiceStack. It's easy to add servicestack, using the Extensionmethod: ``` app.UseServiceStack(new AppHost { AppSettings = new NetCoreAppSe...

7 Oct at 21:28

How to provide List<int> for a data theory ? "InlineData"

How to provide List as a data source for a data theory, I can't find anything in InlineData that supports this : ``` [InlineData(null, new[] { 42, 2112 }, null)] // This doesn't work, I need somethin...

6 Sep at 14:4

What is equivalent to `MapSpaFallbackRoute` for ASP.NET Core 3.0 endpoints?

In ASP.NET Core 2.x I used standard routes registation `Configure` method of `Startup` class to for SPA application using `MapSpaFallbackRoute` extension method from `Microsoft.AspNetCore.SpaServices...

6 Sep at 12:57

Replacement for ExpressionHelper in ASP.NET Core 3.0?

In ASP.NET Core 2.x I was using static method `GetExpressionText` of `ExpressionHelper` class for `IHtmlHelper<T>` extension method: ``` using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal; public ...

10 Apr at 23:18

EF Core "Group By could not be translated and will be evaluated locally."

I am running a simple query against an Sql Server database using Entity Framework Core 2.2.6 however the GroupBy is not being executed on the server, instead it is being executed locally. Is there so...

5 Sep at 14:15

Storing and comparing multiple passwords with ServiceStack

I'm attempting to create a password expiration function in my application. Passwords are already set up as well as authentication and changing passwords. Now I want to prompt the user to change their ...

Use latest version of System.Net.Http in .Net Framework

The latest version of [System.Net.Http](https://www.nuget.org/packages/System.Net.Http/) on nuget is 4.3.4. But even the latest .Net Framework 4.8 ships with 4.2.0 of this library. Even if I add the ...

5 Sep at 10:18

Complex object app settings in Azure Function

I have these entries in my local.settings.json ``` { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "whateverstorageaccountconnectionstring", "FUNCTIONS_WORKER_RUNTI...

5 Sep at 01:7

ServiceStack BasicAuth returning 401 with client_credentials

I have an remote endpoint that requires basic auth and client_credentials in the grant_type. In Postman I can see the headers and body look like this: ``` Request Headers: Content-Type: applicatio...

MSBuild Unhandled Exception: The FileName property should not be a directory unless UseShellExecute is set

- - - - I am running a ASP.NET Core project in docker. When I docker-compose up, I get the following: ``` Unhandled Exception: Microsoft.Build.BackEnd.NodeFailedToLaunchException: The FileName ...

5 Sep at 17:37

Is there a way to specify which IAuthProvider to use for authentication on a particular Service class?

I have two services within the same project: ``` [Authenticate] public class OnlyDoesBasicAuth : Service { } [Authenticate] public class OnlyDoesJwtAuth : Service { } ...

Convert ImageSharp.Image to ImageSharp.PixelFormats.Rgba32?

I am following a tutorial using ImageSharp. How do I convert the type 'ImageSharp.Image' to 'ImageSharp.PixelFormats.Rgba32'? To load the Image, I am using but I keep getting the error: > Cannot impli...

7 May at 03:51

Source array was not long enough. Check srcIndex and length, and the array's lower bounds

I have a C# list which will be added value in Parallel Foreach. Now it always returns exception System.IndexOutOfRangeException. When I pointed to the listTotalCost, it has the following message >...

4 Sep at 10:33

Flutter give container rounded border

I'm making a `Container()`, I gave it a border, but it would be nice to have rounded borders. This is what I have now: ``` Container( width: screenWidth / 7, decoration: BoxDecoration( ...

28 Feb at 16:55

Using ServiceStack for custom JWT verification without user credentials

I'm new to ServiceStack and using it to provide an endpoint that will receive incoming requests from a remote service. No end user is involved. The authentication flow goes like this (as specified by...

4 Sep at 09:18

ASP.NET Core with React template returns index.html

I am learning full-stack web development with .NET Core and React, so I created an ASP.NET Core Web Application project with React template in Visual Studio 2019. At some point I noticed that if I re...

How to use [FromHeader] attribute with custom model binding in Asp.Net Core 2.2

I need to add many custom headers in my request. I can use something like this ``` public ActionResult Get([FromHeader, Required]string header1, [FromHeader]string header2, ... , [FromHeader]string ...

3 Sep at 13:30

Servicestack SendAll is working but sending an error

I am sending a CSV and de-serializing it. ``` List<CompanyService> responseX; using (var reader = new StreamReader(files[0].InputStream)) { // convert stream t...

3 Sep at 21:46