#C .NET Core, JsonConvert fails to convert null to bool

Newtonsoft.Json.JsonSerializationException: ‘Error converting value {null} to type “System.Boolean”. Code like this can generate the error: This happens when the bool field in your source is null, and the model you’re converting into’s matching field does not allow nulls. If you don’t mind this field being null in your destination model item, then you can just... » read more

The remote server returned an error: (500) when pinging Zapier in a .NET Core app

Getting this error in a .NET Core web app? In this case we were trying to ping Zapier. Server Error in ‘/’ Application.The remote server returned an error: (500) Internal Server Error.Exception Details: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.Stack Trace:[WebException: The remote server returned an error: (500) Internal Server Error.]System.Net.WebClient.OpenRead(Uri... » read more

Azure .NET Core Web App DirectoryNotFoundException: Could not find a part of the path

Getting this error in an Azure .NET Core Web App deployed via GitHub? An unhandled exception occurred while processing the request. DirectoryNotFoundException: Could not find a part of the path ‘D:\home\site\wwwroot\Templates\my_file.html’. System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) DirectoryNotFoundException: Could not find a part of the path ‘D:\home\site\wwwroot\Templates\my_file.html’. System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) System.IO.FileStream..ctor(string path, FileMode mode,... » read more

ASP.NET Core Web Forms App: A namespace cannot directly contain members such as fields

After creating a new Razor web forms app I scaffolded in an existing database: Scaffold-DbContext "Server=<server>;Database=<db-name>;User ID=<username>;Password=<password>;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models And kept getting an error on the newly created entries: A namespace cannot directly contain members such as fields After ensuring I had added Entity Framework to the project using NuGet, I still got the... » read more