Conventions on having both an API and MVC project in .NET Core solution
I have an ASP.NET Core (.NET Core 2.2) app structured with the following projects: - API: this is meant to represent a WebAPI (with controllers inheriting `ControllerBase`) - Services: This contains s...
- Modified
- 7 May at 03:52
How to set SameSite cookie attribute to explicit None ASP NET Core
Chrome 76 will begin to support an explicit `SameSite: None` attribute [https://web.dev/samesite-cookies-explained/](https://web.dev/samesite-cookies-explained/) I found that the current implementa...
- Modified
- 9 May at 20:8
What is the difference between /auth and /authenticate?
Swagger exposes the following endpoints :  The payloads look identicle and the documentation : [https://docs.servicestack.net/authentication-and-authoriz...
- Modified
- 9 May at 12:2
.Net Core Middleware - Getting Form Data from Request
In a .NET Core Web Application I am using middleware (app.UseMyMiddleware) to add some logging on each request: ``` public void Configure(IApplicationBuilder app, IHostingEnvironment env) { ...
- Modified
- 9 May at 08:22
Error Fody: No weavers found. Add the desired weavers via their nuget package
I have already installed Fody in my application several and several times but still this error appears below, could anyone tell me why it happens? I use the latest version of Visual Studio and latest ...
- Modified
- 8 May at 21:57
What are the costs and possible side effects of calling BuildServiceProvider() in ConfigureServices()
Sometimes, during service registrations, I need to resolve other (already registered) services from the DI container. With containers like Autofac or DryIoc this was no big deal since you could regist...
- Modified
- 10 May at 16:54
ServiceStack in ORMLite how do I make a simple reference to a parent table?
I have 2 tables, the parent table holds definition fields for a history table. I am trying to reference the foreign key of the def table in the history table, but when I run this code, the referenced ...
- Modified
- 7 May at 17:36
Email that is automatically parsed by Gmail and adds a Calendar event
I hope this question is OK to ask here, given that it could replace my usage for Google Calendar API I think it should be OK. [https://stackoverflow.com/help/on-topic](https://stackoverflow.com/help/o...
- Modified
- 19 Jan at 08:54
ServiceStack - Email Confirmation
I'm trying to implement email confirmation in ServiceStack. I've spent 5 days trying to make sense of all the authentication mechanism, and I must say it's very complex. The code not easy to read. I ...
- Modified
- 7 May at 02:24
Windows Authentication - require additional password for special users
I am developing an intranet asp.net core web api application. The requirements for authentications are: - - - Now, what I have so far: - - I am using claims transformer middlewere in order to chec...
- Modified
- 21 May at 09:56
How can I resolve "The argument type 'String' can't be assigned to the parameter type 'int' " - Flutter
I'm trying to fetch data Online Using HTTP GET with Flutter SDK. I'm trying with this code [https://github.com/RaglandCodes/Flutter-basic-API/blob/master/lib/main.dart](https://github.com/RaglandCodes...
Is adding AddMvc() Service twice in ConfigureServices() a good practice in Asp.Net Core?
I'm creating a Nuget Package for Asp.Net Core. I want to make it simple to configure. So I decided to give a fluent way approach to add my Nuget to the service collection in `ConfigureServices()` in A...
- Modified
- 20 Aug at 08:18
What is the difference between UseStaticFiles, UseSpaStaticFiles, and UseSpa in ASP.NET Core 2.1?
ASP.NET Core 2.1.1 offers several seemingly related extension methods for appBuilder: - `UseStaticFiles``Microsoft.AspNetCore.StaticFiles`- `UseSpaStaticFiles``Microsoft.AspNetCore.SpaServices.Extensi...
- Modified
- 23 Dec at 20:36
How do I update states `onChange` in an array of object in React Hooks
I have retrieved data stored using `useState` in an array of object, the data was then outputted into form fields. And now I want to be able to update the fields (state) as I type. I have seen example...
- Modified
- 16 Feb at 17:46
ASP.NET Core 2.2 WebAPI 405 Method Not Allowed
- - - Run an Integration Test against a controller method in my Web API that uses a `PATCH` verb ``` namespace FluidIT.API.Controllers { [Route("api/v1/[controller]")] [ApiControlle...
- Modified
- 4 May at 14:38
ServiceStack replacement for WCF
I currently use a command-line client, that communicates WCF to communicate between a client (over http) and an IIS web server. The WCF request packages is very large (like 10 GB). Can I use service...
- Modified
- 3 May at 19:59
Nullable reference types: How to specify "T?" type without constraining to class or struct
I want to create a generic class that has a member of type `T`. `T` may be a class, a nullable class, a struct, or a nullable struct. So basically anything. This is a simplified example that shows my ...
- Modified
- 14 Jul at 03:5
EF Core - may cause cycles or multiple cascade paths
I've set up what I thought was a pretty simple database.. However I am getting the following error. > Introducing FOREIGN KEY constraint 'FK_User_Suburb_SuburbId' on table 'User' may cause cycles or ...
- Modified
- 3 May at 13:18
Apply Entity Framework migrations when using ASP.Net Core in a Docker image
I have an ASP.Net Core application which uses Entity Framework with Sqlite. I am building a Docker image to deploy this. The ASP.Net Core application runs fine when debugging with VS Code, but when r...
- Modified
- 3 May at 12:47
how to use multiple folder into app.UseStaticFiles in .net core?
I want to get access to multiple folder locations from my web api to display image. I can't change the folder locations (depending on devices on which I don't have right to modify anything). for one ...
- Modified
- 2 May at 15:45
Detect source language at runtime from within debugging visualizer
I am writing a [debugging visualizer for Visual Studio](https://github.com/zspitz/ExpressionToString#visual-studio-debugger-visualizer-for-expression-trees) that renders expression trees into C# or VB...
- Modified
- 2 May at 13:58
ServiceStack doesn't populate the response DTO when throwing HttpErrors
ServiceStack doesn't populate the original response in the WebServiceException's responseDTO property. I'm running the code below which should always return a 404 response code with the ResponseStatu...
- Modified
- 2 May at 12:59
Mock IOptionsMonitor
How can I make an class instance manually of a class that requires an IOptionsMonitor in the constructor? ``` private readonly AuthenticationSettings _authenticationSettings; public ActiveDirector...
- Modified
- 18 Jul at 02:54
Casting private key to RSACryptoServiceProvider not working
I have a X509Certificate2 variable and I'm trying to cast the private key of the variable to a RSACryptoServiceProvider However I get this exception. > System.InvalidCastException: 'Unable to cast obj...
- Modified
- 6 May at 20:34
Catch exception not of a type
Is there a difference when catching exceptions not of a type between : ``` try { ... } catch (TaskCanceledException) { throw; } catch (Exception exception) { ... } ``` and : ``` try { ...
- Modified
- 2 May at 07:39