A very quick tip how to solve “HTTP Error 403.16 – Forbidden” issue when trying to run a new MVC web application on Windows 10 using IIS 10 Express. After some quick tests and research on Google I made a conclusion that this problem is actually not related neither to Windows, nor IIS.
One more useful SQL code snippet – sp_generate_inserts. This stored procedure (SP) generates SQL insert statements of existing data from the table specified. It is a very handy script when you have limited options to make a database backup file, but still need to export data.
This script was originally written by Narayana Vyas Kondreddi back in 2002, however his website is not accessible any more. Therefore I had to slightly modify the script to work on Azure SQL databases, since Azure SQL has some limitations/changes compared to classical MSSQL.
MSSQL server index fragmentation check code snippet I had in my archive. It shows what indices would be good to add, and also shows the most CPU intense queries. A nice SQL optimization toolkit.
Using ASP .NET MVC 5 still has the classical web application project structure (compared against the new MVC 6), and dependency injection (DI) is quite straightforward using a third party library. And to make this process even simpler, I decided to try out Simple Injector. It’s a very simple and fast DI .NET library.
In development and testing environments we quite often have to drop databases and re-create them from scratch. It’s a little bit annoying when you need to right on click the database in SQL Management Studio, select Delete, and even put a tick on “Close existing connections” to be able to delete the database when it’s in use.
A quick reminder on how to select all tables from a MSSQL database. These two queries below can select all tables from any database including master database.
This is my the very first blog post :)
I’ve decided to create a blog like a single storage for all my code snippets, samples, notes and ideas. This will help me to have everything easily searchable and in one location, and avoid syncing text/sql/cs files via DropBox on different machines at work/home.