A quick write up to document web config changes when deploying to azure using release pipelines in azure devops
So – you want a step by step guide to deploying web apps to azure web apps from azure devops and changing config files in the release pipelines? Look no further. First create the new web.config files, as seen below In the file properties – make sure they are set to “Content” and “Copy Always” […]
The peculiar problem when your entity framework query returns the same row for every record
This one had me confused for a long time, several hours in fact. There were over 8,000 rows in the table, and the for some reason the query was returning the same row 8,000 times. After much rending of garments and gnashing of teeth, I discovered that the table in question (in a sql server […]
How to fix problems with file creation and web deployment in asp.net
The scenario – you have an asp.net app that creates a file of some kind – everything works great – then you upload it and the file is not created. It turns out that Visual Studio will not deploy an empty folder, or a folder that it seems as empty anyway – if the app […]
How to fix problems with Jquery Validate and dynamically generated forms
I recently came across the problem of validating dynamically generated forms with the jquery.validate plugin – everything worked well with the original form, but when there were multiple forms available I got peculiar syntax errors. A quick googling told me to simply add the following code $(“form”).validate(); to the javascript and everything would be fine. […]
How to track outbound links in the new version of Google Analytics
So the Gods of Google have gone and changed their basic Google Analytics code to something that works slightly better, and now your outbound link tracking code doesn’t work. Here is how you fix that – first make sure you have the most recent (as of July 2013 Google Analytics code, it looks something like […]
Tips and Tricks for running WordPress on Windows Azure
I recently decided to experiment with Windows Azure, and here are some lessons learned about running WordPress on Windows Azure. I wish I’d known these things before I started. Getting an install of WordPress on Windows Azure is as simple as they say it is. Moving an existing site over to it can be challenging. […]
How to fix Visual Studio slowness problems by deleting ExpansionsXML.xml
The Problem I’ve had Visual Studio 2010 installed from the first day it was released, and lately it has gotten significantly slower. That’s not surprising with an increased number of add-ons and extensions. However, closing the program recently started taking an increasingly long period of time. It recently reached OVER EIGHT MINUTES so I […]
How to programatically set the sql server database used by entity framework
The Problem: For one reason or another you need to set the database used by entity framework programatically. The more common way of doing such a thing is to set the database in your web.config class, but for whatever reason you need to set it in actual C# code. The Cause: There is no cause […]
How to use UI Hints and Display Templates in ASP.net MVC 3
Surprisingly there is very little information about UI Hints and Display templates for ASP.net MVC 3, so I thought I would share what I have learned. What are Display Templates? Display Templates are lovely features of ASP.net MVC 3 that allow you to have a common formatting for certain properties of your objects. For example, […]
How to fix the Initialization method TestInitialize threw exception problem in In Visual Studio 2010 Unit Testing
The Problem You are making an ASP.net MVC 3 web application, and being a good person, you are unit testing as much as possible. You have properly separated your database from your business objects and every other good practice. However, when you unit test your controllers, you throw in a fake DBContext (I am assuming […]