servicestack auth is failing with 502
I upgraded to servicestack from 5.4.1 to 5.6.0 and now my service in azure is locking up and will not allow users to login. If I restart the service it works util some point they receive an error. Af...
- Modified
- 12 Dec at 22:30
How to disable "Attempting to reconnect to the server" message on ASP.NET Core producton server
I have an ASP.NET Core 3.1 C# razor pages application that also uses some Blazor-serverside razor components. I have published it to IIS on Windows 2008 R2 Server. But when browsing the site in Chrome...
- Modified
- 13 Dec at 15:1
What does exclamation mark mean before invoking a method in C# 8.0?
I have found a code written in C# seemingly version 8.0. In the code, there is an exclamation mark before invoking a method. What does this part of the code mean, and above all, what are its uses? ``...
How to refresh a blazor sub/child component within a main/parent component?
You have a main component and inside the main component you have many sub-components You want to refresh a single subcomponent, rather than the entire screen of the main component, is this possible? ...
- Modified
- 7 Dec at 14:19
C# 8.0 - Can't use default interface implementations
I recently read about C# 8.0 having interface default implementations, so i went into my project and tried it out, but i was met with an error instead. `Target runtime doesn't support default interfac...
Returning a 403 status code in Service Stack
I have a web service using service stack and I'm putting in a blacklist check to stop the processing of requests from a list of the blacklisted IP addresses. How do I return a 403 status code back to...
- Modified
- 6 Dec at 12:38
.Net Core 3.0 possible object cycle was detected which is not supported
I have 2 entities that are related as one to many ``` public class Restaurant { public int RestaurantId {get;set;} public string Name {get;set;} public List<Reservation> Reservations {get;se...
- Modified
- 31 Jan at 11:24
"context.Resource as AuthorizationFilterContext" returning null in ASP.NET Core 3.0
I am trying to implement a custom authorization requirement following a tutorial. It seems like `context.Resource` no longer contains `AuthorizationFilterContext` and as a result: ``` var authFilter...
HttpClientFactory: Typed HttpClient with additional constructor arguments
With [HttpClientFactory](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-3.1#typed-clients) we can configure dependancy injection to create and manage the life...
- Modified
- 16 Dec at 10:24
ImportError: cannot import name 'six' from 'django.utils'
Recently, I upgraded the version of Django framework from `2.0.6` to `3.0` and suddenly after calling `python manage.py shell` command, I got this exception: > ImportError: cannot import name 'six' f...
- Modified
- 1 Apr at 12:34
Could not load file or assembly "ChilkatDotNet45.dll" or one of its dependency. ......After deploying in IIS
My asp.net application works fine when run from visual studio, but after deploying in IIS it throws error like : Could not load file or assembly "ChilkatDotNet45.dll" or one of its dependency. An atte...
TargetFramework vs. TargetFrameworks (plural)
In the `.csproj` file in my .NET Core projects, there are these 3 lines by default: ``` <PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> </PropertyGroup> ``` Now if I want to targ...
- Modified
- 5 Dec at 09:35
How to make ASP.NET Core return XML result?
``` [HttpGet] [HttpPost] public HttpResponseMessage GetXml(string value) { var xml = $"<result><value>{value}</value></result>"; return new HttpResponseMessage { Content = new String...
- Modified
- 5 Dec at 08:39
Template not provided using create-react-app
When I type the `create-react-app my-app` command in my terminal, it appears to work - downloading all libraries successfully etc. At the end of that process however I get a message that a `template w...
- Modified
- 5 Dec at 05:12
.NET 4.7.2 Dependency Injection in ASP.NET WebForms Website - Constructor injection not working
We are currently working with an older project (ASP.NET Web Forms Website) and trying to see if we can set up dependency injection for it. Need to emphasize: this is NOT a Web Application project... ...
- Modified
- 4 Dec at 13:33
How to bind object to <select> option in Blazor?
I have the following dropdown menu: ``` public class object { public other_object apple {get; set;} ... public string stuff {get; set;} ... } public class other_object { public s...
- Modified
- 4 Dec at 13:21
ASP.NET Core WebSockets
I'm trying to have a WebSocket server up and running on ASP.NET Core. I created an empty web project `dotnet new web` changed the `Program.cs` to: ``` public static void Main(string[] args) { Host...
- Modified
- 26 Jan at 07:3
Entity Framework Core 3.0 performance impact for including collection navigation properties (cartesian explosion)
We're facing a major performance problem after upgrading EF Core 2.2 to EF Core 3.0. Imagine a simple data model with a single collection navigation property and hundreds of fields (the reality looks ...
- Modified
- 5 Dec at 16:12
MongoDB connection error: MongoTimeoutError: Server selection timed out after 30000 ms
I am trying to create a fullstack app reading the following tutorial: [https://medium.com/javascript-in-plain-english/full-stack-mongodb-react-node-js-express-js-in-one-simple-app-6cc8ed6de274](https...
- Modified
- 6 Dec at 11:32
Is the correct way to cancel a cancellation token used in a task?
I have code that creates a cancellation token ``` public partial class CardsTabViewModel : BaseViewModel { public CancellationTokenSource cts; public async Task OnAppearing() { cts = new Cance...
- Modified
- 4 Dec at 02:52
Check if Graph API folder exists
I am using Microsoft Graph API and I am creating a folder like so: ``` var driveItem = new DriveItem { Name = Customer_Name.Text + Customer_LName.Text, Folder = new Folder { }, Ad...
- Modified
- 11 May at 18:47
Array and string offset access syntax with curly braces is deprecated
I've just updated my php version to 7.4, and i noticed this error pops up: > Array and string offset access syntax with curly braces is deprecated here is part of my code which is triggering the above...
Unable to load System.Threading.Tasks.Extensions
I have a web project build on .net framework 4.5.1. We are trying to added PostgreSQL support for the project. Using Nuget, I have installed 4.0.4 npgsql to the project. Under references, I see the fo...
Visual Studio Code PHP Intelephense Keep Showing Not Necessary Error
After the latest update of PHP Intelephense that I get today, the intelephense keep showing an error for an undefined symbol for my route (and other class too), there is no error like this before and ...
- Modified
- 3 Dec at 03:42
Blazor in MVC: Component gets rendered, but @onclick not working. Problem with connection
I'm trying to use Blazor in a .net core 3 MVC project. I used a few tutorials to do this, like [https://fizzylogic.nl/2019/08/18/integrating-blazor-in-an-existing-asp-net-core-application/](https://fi...
- Modified
- 3 Dec at 14:40