I have a class that inherits from Exception. In .NET 4, I started receiving a runtime error:
Inheritance security rules violated while overriding m
I got this error that made no sense for my case ! I used this simple example https://www.c-sharpcorner.com/article/using-autofac-with-web-api
The problem was that I had no space and did not noticed it so I solved this by making space on my drive.
Maybe this will save somebody a few hours of useless investigation.