An exception was thrown while deserializing the token.The antiforgery token could not be decrypted in .Net Core 2.2 application

I am getting the error in my log. I spent most of my day finding the solution but could not find the one which meets my requirement. Here is the log error > severity=[ERROR], ipaddress=xxxx, subproces...

17 Aug at 03:17

Seeking an understanding of ServiceStack.Redis: IRedisClient.PublishMessage vs IMessageQueueClient.Publish

I am having a hard time separating the `IRedisClient.PublishMessage` and `IMessageQueueClient.Publish` and realize I must be mixing something up. ServiceStack gives us the option to listen for pub/sub...

The EF Core tools version '3.1.2' is older than that of the runtime '3.1.7'. Update the tools for the latest features and bug fixes

``` PM> update-database Build started... Build succeeded. The EF Core tools version '3.1.2' is older than that of the runtime '3.1.7'. Update the tools for the latest features and bug fixes. ``` I tr...

ormlite async methods throw casting exception with miniprofiler

When using async ormlite methods (like below), Ormlite throws the following error. Unable to cast object of type 'StackExchange.Profiling.Data.ProfiledDbCommand' to type 'System.Data.SqlClient.SqlComm...

How to fix error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system, (without security risk)?

Error on terminal: `nodemon.ps1` cannot be loaded because running scripts is disabled on this system. For more information, see at [https://learn.microsoft.com/en-us/powershell/module/microsoft.power...

"You may need an additional loader to handle the result of these loaders."

I am currently trying to build a State Management Library for ReactJs. But as soon as I implement it into my React project (created with `create-react-app`), it starts dropping this error: ``` Failed ...

Xamarin.Android C# layout_weight error: Must specify a unit, such as "px" (Intellisense?)

A snippet of my layout: ``` <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content"> <Button ...

14 Aug at 20:3

System.Text.Json: How to apply a JsonConverter for a collection with a custom converter for the collection's items?

I have a class that I want to serialize to JSON. The class contains some trivially serialized members but the problem is that I have a list of objects that are from a cpp library (I have a C# has a wr...

22 May at 04:15

Custom JSON serializer for optional property with System.Text.Json

I'm trying to implement a JSON serialization mechanism which handles both `null` and missing JSON values, to be able to perform partial updates when needed (so that it does not touch the field in the ...

19 Aug at 10:18

Failed to resolve for reference Microsoft.Azure.WebJobs.Extensions - Metadata generation failed

Had to pick up a bit of work from another developer so just trying to wrap my head round it all! But I'm having issues building an Azure Functions project and continuously getting a error coming form ...

14 Aug at 14:7

Returning a Value Tuple of Custom Objects From Ormlite

I'm trying to do a simple Join on 2 tables and return a Value Tuple of those two tables. ``` public partial class DeliveryMethod { [Required] [PrimaryKey] public int DeliveryMethodId { get...

13 Aug at 21:3

ServiceStack not showing up in Visual Studio

According to this documentation: [https://youtu.be/EaUcPXVeLpk?t=20](https://youtu.be/EaUcPXVeLpk?t=20) I should be able to right click and select "Add ServiceStack Reference" I don't see that option:...

12 Aug at 13:24

In System.Text.Json is it possible to specify custom indentation rules?

[.Net runtime repo](https://github.com/dotnet/runtime/issues/40731) When setting JsonSerializerOptions.WriteIndented = true indentation looks like this when writing json... ``` { "TILESET": "tileset...

13 Aug at 17:24

Redis Client Side Caching for .Net

Redis 6 has introduced a feature supporting Client Side Caching and is described in here: [https://redis.io/topics/client-side-caching](https://redis.io/topics/client-side-caching) I tried out the Ser...

Could not locate .NET Core project. Assets were not generated

I just started learning C# a couple hours ago, but have since run into this error. Ctrl + Shift + P > .NET:Generate Assets for Build and Debug But when I click it, an error pops up bottom right of the...

12 Aug at 14:14

AWS CDK Init for an existing project

I'm trying to initialize the AWS CDK on a new website I just created via Visual Studio. But when I run the init commmand I get the error: `cdk init` ``` ❯ cdk init app --language=csharp `cdk init` can...

How to auto increment the version (eg. “1.0.*”) of a .NET Core project?

In the old .NET framework, you could set the `[assembly: AssemblyVersion("1.0.*")]` and the compiler would auto-increment the version. With .NET core, I've tried all sorts of things, but I can't get i...

Python 3.7 Error: Unsupported Pickle Protocol 5

I'm trying to restore a pickled config file from RLLib ([json didn't work as shown in this post](https://stackoverflow.com/questions/62908522/error-callbacks-must-be-a-callable-method-that-returns-a-s...

9 Aug at 18:3

Run async code during startup in a ASP.Net Core application

After changing the signature of the function `ConfigureServices` to be asynchronous (originally it was just a void synchronous function and the application worked perfectly fine), I get the following ...

Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. - How?

This issue can be replicated easily, but I do not know the correct way to resolve it. For example, you have a class and a class. Each Game has two Teams. When using standard OOTB EF naming conventio...

Why is the pseudo-random number generator less likely to generate 54 big numbers in a row?

Consider an event that occurs with probability . This program checks how many failed trials it takes before the event occurs and keeps a histogram of the totals. e.g.: If were 0.5, then this would...

8 Aug at 19:6

Invalid signature when creating a certificate using BouncyCastle with an external Azure KeyVault (HSM) Key

I'm trying to generate a certificate self-signed by a KeyPair stored in Azure KeyVault. My end result is a certificate with an : [](https://i.stack.imgur.com/b6HpS.png) Generating the certificate para...

OpenAPI / Swagger-ui: Auto-generated JSON in form ignores parameter name

[this post](https://forums.servicestack.net/t/swagger-put-post-body-value-issue/4790) I am using ServiceStack and its OpenApi plugin. I am not sure though if this is an Swagger-ui problem, ServiceStac...

How to use the Either type in C#?

[Zoran Horvat](https://www.pluralsight.com/authors/zoran-horvat) proposed the usage of the `Either` type to avoid null checks and during the execution of an operation. `Either` is common in functiona...

3 Aug at 16:35

Why are Func<> delegates so much slower

I was in the process of moving repeated arithmetic code into reusable chunks using funcs but when I ran a simple test to benchmark if it will be any slower, I was surprised that it is twice as slow. ...