#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

Import of flat file into SQL Server Management Studio fails

With this error: Error inserting data into table. (Microsoft.SqlServer.Import.Wizard)Error inserting data into table. (Microsoft.SqlServer.Prose.Import)Object reference not set to an instance of an object. (Microsoft.SqlServer.Prose.Import) In my case this was due to extra carriage returns at the end of the CSV file – SSMS doesn’t like them! Remove them in a text editor and try again.... » 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

Login failed for user ‘NT AUTHORITY\NETWORK SERVICE’

After our server people did some MS SQL database restores from some old backups to find some data, some .NET websites we had on the server started showing an error. (note I couldn’t see the error and had to disable custom errors from remote only, see here http://tech.ralpharama.co.uk/1/viewing-errors-remote-machine-after-sql-restores-broke-sites Server Error in '/' Application. Cannot open database... » read more