Dynamically ignore property on sealed class when serializing JSON with System.Text.Json
### Question Can I dynamically ignore a property from a sealed class using [System.Text.Json.JsonSerializer](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializer)? ### Exam...
- Modified
- 7 Jul at 22:27
How can I open a new window without using JS
In blazor i use `NavigationManager.NavigateTo(url)`in order to change window location, but how can I use it to open a new tab with a specified URL without having to invoke JS on `OnAfterRenderAsync()`...
Could not load file or assembly System.Runtime.CompilerServices.Unsafe
I created a Visual Studio (Community 2019) project with C# using `ServiceStack.Redis`. Since it is C#, I use Windows 10 (there is a Redis version for Windows but it is really old and as I know, it is ...
- Modified
- 7 Jul at 11:47
I get an error when I add migration using Entity Framework Core
I built a console project and use code first to map model to database. When I run the command of `Add-Migration InitialMigration`, I get an error: > Method 'Create' in type 'Microsoft.EntityFrameworkC...
- Modified
- 6 Jul at 20:3
How to archive or delete Redis log file
I am using Redis open source from redis.io. I have configured my redis.conf file and set the as "" from default setting "". This helps in reducing the logfile size. My log file is growing in size and...
- Modified
- 6 Jul at 05:6
How can I run offline database usage in Blazor WebAssembly-PWA?
I have a `Blazor WebAssembly ASP.NET Core hosted - PWA` application and want to run it offline. The database is currently built with SQLite and EF-Core. Is it possible to add offline functionality? I ...
- Modified
- 4 Jun at 03:21
How can I use/inject a service in a "normal" c# class like in Blazor @inject ClassName classObject
I have a Blazor Project, in the Program.cs(formaly aka Startup.cs) I added a service I can use/access that service on a razor/blazor page like this : @inject Models.UserVisit userVisitObj Use...
ServiceStack AutoQuery Is Null for Asp.Net.Core and NullReferenceException thrown at CreateQuery
I've done the Plugins.Add(new AutoQueryFeature { MaxLimit = 100 }); and used it in startup Configure Method. [](https://i.stack.imgur.com/q5fN2.png) [](https://i.stack.imgur.com/WQATQ.png) This is dto...
- Modified
- 4 Jul at 09:0
Server Error in '/' Application. when deployed ServiceStack to Virtual Folder
I'm trying to deploy a ServiceStack API to IIS7 in a Virtual Directory but I'm getting this error [enter image description here](https://i.stack.imgur.com/u9rjg.png) [](https://i.stack.imgur.com/ItVF...
- Modified
- 15 Jul at 07:44
The performance penalties for types/constraints in Raku?
In contrast with Perl 5, Raku introduced gradual typing. The landscape of gradually typed object-oriented languages is rich and includes: Typed Racket, C#, StrongScript, Reticulated Python. It's said ...
- Modified
- 3 Jul at 14:6
In C#, why does type inference on new expressions result in nullable references?
If I have the C# 8 code: And later: Then the type of `bar` is `Foo?`. This seems clearly incorrect, as a `new` expression can't return `null`. Why would `bar` be a nullable reference? I even looked up...
- Modified
- 6 May at 20:29
Usage of ConfigureAwait in .NET
I've read about ConfigureAwait in various places (including SO questions), and here are my conclusions: - - - `.ConfigureAwait(true)` My questions are: 1. Are my conclusions correct? 2. When does Con...
- Modified
- 1 Jul at 17:9
Increase upload file size in Asp.Net core v3.1
I'm trying to upload multiple files in my .NET Core v3.1 Blazor application, but I can't get passed the 30MB limit. Searching for this I found [Increase upload file size in Asp.Net core](https://stack...
- Modified
- 1 Jul at 15:52
Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project
I've tried to run Android Studio project from github but I've got this message: ``` This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please re...
- Modified
- 1 Jul at 14:10
Why does C# null-conditional operator not work with Unity serializable variables?
I've noticed that if I have some variables exposed to the Unity inspector such as: ``` [SerializeField] GameObject _tickIcon; ``` If I leave them unassigned and try to use the null conditional operat...
- Modified
- 1 Jul at 13:41
Error: write EPROTO 34557064:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER
``` Error: write EPROTO 34557064:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242: ``` The issue was that I was trying to POST t...
- Modified
- 18 Jul at 13:49
ConvergenceWarning: lbfgs failed to converge (status=1): STOP: TOTAL NO. of ITERATIONS REACHED LIMIT
I have a dataset consisting of both numeric and categorical data and I want to predict adverse outcomes for patients based on their medical characteristics. I defined a prediction pipeline for my data...
- Modified
- 20 Apr at 10:14
ServiceStack Proxy Feature code optimization
I'm tasked with creating a proxy for an internal system. The proxy needs to add a Basic authentication header to each request as well as log it and the response. I'm using ServiceStack's Proxy Feature...
- Modified
- 7 Jan at 15:9
How can I deal with this Git warning? "Pulling without specifying how to reconcile divergent branches is discouraged"
After a `git pull origin master`, I get the following message: ``` warning: Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running one o...
- Modified
- 22 Sep at 18:10
Invariant Violation: "main" has not been registered
New to React Native: I started a brand new project with Expo init and then I followed the instructions mentioned inhttps://reactnavigation.org/docs/hello-react-navigation I run the project with expo ...
- Modified
- 30 Jun at 02:26
Testing C# 9.0 in VS2019 - CS0518 IsExternalInit is not defined or imported ... How do I define/import it?
: .NET 5.0 is out now, but the solution below is still required if you're targetting .NET Standard 2.1 --- C# 9.0 is still under development. There are a couple references which lead me to believe...
ASP.NET Core 3.0 Identity Server 4 (4.0.0) SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'empty'
I keep getting the following error between postman and IdentityServer 4 ``` Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'empt...
- Modified
- 28 May at 20:18
How to enable nginx reverse proxy to work with gRPC in .Net core?
I am running into a problem where I am unable to get nginx to work properly with gRPC. I am using .Net core 3.1 to server an API that supports both REST and gRPC. I am using below docker images: - - ...
"Analyzer with Code Fix" project template is broken
How to setup a roslyn code analyzer project with a unit-test project in Visual Studio 2019 v16.6.2? A few months (and a few Visual Studio updates) ago I experimented with setting up a code analyzer ...
- Modified
- 30 Jun at 15:4
What is a method that's inside another method called?
What type of method is `String dgvValue(int cell)` in the below code? ``` private void btnEdit_Click(object sender, EventArgs e) { if (dgvGuestList.SelectedRows.Count > 0) { String dgv...