Entity Framework - Debugging a Seed method from the Package Manager Console
Fri Feb 08 2019ProgrammingWeb Development
On the odd occasion you wish to debug Seed method code which has been executed from the Package Manager Console using the Update-Database command, a quick and dirty method is to add the following code: Yes it's dirty! It will however fire up a new Visual Studio debug window and allow you to see what's going on inside. This method will also work for any code that happens to sit outside of a normal debugging scenario.
ASP.NET Core website in IIS - "HTTP Error 500.19" error
Wed Jan 16 2019Uncategorized
When running an ASP.NET Core website in IIS, you may experience the following error: "HTTP Error 500.19 – Internal Server Error" (Code: 0x8007000d) The following article describes the error as being "This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed XML element.": This comes down to the presence of the following tag: You'll need to install the…
Http Range Requests in ASP.NET Core
Tue Jan 08 2019ProgrammingWeb Development
Here's a small code snippet to use Http Range Requests with ASP.NET Core butchered from this now outdated MSDN article: The "Request.Headers.Range" method has now been replaced by opting in for this functionality using the enableRangeProcessing boolean when returning a FileStreamResult object. Have fun!
How to customise Visual Studio's "Create and initialize field" to add the underscore
Mon Jan 07 2019ProgrammingWeb Development
Step 1 - Starting with the Tools menu item from the top navigation menu, navigate through the menus as follows: Tools > Options > Text Editor > C# > Code Style > Naming Step 2 - Click the green Plus icon to open the following dialogue box: Step 3 - Now add the following: Step 4 - Create the configuration to use the naming style we've just created. Step 5 - Use the "Create and initialize field"option as normal and you'll see the following.
Test Explorer hangs in Visual Studio
Fri Jan 04 2019Programming
Restarting Visual Studio usually works but instead try using taskkill (Read more: [1][2]) to end the offending process: taskkill.exe /IM vstest.console.exe /F
© Copyright 2008-2021 Terry Butler