3008 A configuration error has occurred

A static HTML website I look after is hosted on a Windows Server 2012R2 instance running IIS, it makes use of a web.config file as it has some settings that allow this site to be served from behind an Amazon Web Services Elastic Load Balancer. Today it kept crashing with the thousands of these events in event viewer: Event code: 3008 Event message: A configuration error has occurred. Event time: 05/03/2020 09:15:49 Event time (UTC):...

Continue Reading

Call UseSession after UseRouting and before UseEndpoints

Today, I fixed a bug where session cookies were not being persisted in an ASP.Net Core Razor Pages application. The answer was in the documentation. To quote that page: The order of middleware is important. Call UseSession after UseRouting and before UseEndpoints So my code which did work in the past, but probably before endpoint routing was introduced was this: app.UseSession(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapRazorPages(); }); And the fix was to move UseSession...

Continue Reading

Restart Omnisharp process within Visual Studio Code

Another quick one for today, Every now and again my intellisense gets confused in Visual Studio Code displaying errors and warnings that should not exist. The fix for this is to restart the Omnisharp process. So first off get the commmand pallette up: Ctrl+Shift+P Then type: >omnisharp:restart omnisharp Everything should then go back to normal. Success 🎉

Continue Reading

Assembly with same name is already loaded

I am in the process of building and publishing my first ever NuGet package and while I am not ready to go into that today I can post a quick tip about fixing an error I had with a library I am using to help with git versioning. The library is Nerdbank.GitVersioning and the error I got was when I tried to upgrade from an older version to the current one. The error? The "Nerdbank.GitVersioning.Tasks.GetBuildVersion"...

Continue Reading

Show hidden files with a macOS keyboard shortcut

A very very quick one today. Sometimes when developing on macOS I want to view hidden files in Finder but most of the time it is just extra noise so I like them hidden. There is a keyboard shortcut to toggle the visibility of these files. cmd + Shift + . (thanks to osx daily for the tip and image.) This keyboard shortcut will show hidden files or hide them if shown… Success 🎉

Continue Reading