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 fix “The system cannot find the path specified” error in asp.net mvc 4
The Problem: So, you’re coding away, and you run your asp.net mvc 4 site and you get the following error: The system cannot find the path specified The Cause: Most likely you have not already specified the database in the web.config, it’s a simple fix. The Solution: Just add this code into the web.config <add […]
How to fix problems running Windows Azure web applications locally
The Problem: You have an asp.net mvc 3 web project, and you are running it as part of a windows azure web application. In my case it worked initially, but after I installed some Visual Studio plugins, run Windows Update, and installed a new router, it mysteriously stopped working. A few of the error […]
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 […]
How to fix problems with asp.net mvc 3 and jQuery UI AutoComplete
The Problem: You’re tooling along, using the jQuery library to write some great search feature, and you write some great Linq to Sql code. Being an awesome coder your use the extension method syntax. Your action result (in the appropriate controller) looks like this public ActionResult QuickSearch(string term) { var lst = context.Contacts.Select(xx => new […]
How to fix the Entity Framework Code First problem – Model compatibility cannot be checked because the database does not contain model metadata problem
The Problem So, you are tooling around in asp.net mvc 3 Entity Framework Code First, and you make a change to your underlying model. you then get the following error when Entity Framework tries to recreate the database in Sql Server or Sql Server Express Model compatibility cannot be checked because the database does not […]
ASP.Net MVC 3 In Review – One Year Later
It’s been a little over a year since I’ve devoted myself to Asp.net MVC 3 and on the whole I’m quite impressed. Microsoft seems to have picked a definite direction for the web (the Microsoft Web Platform Installer makes a nice guide for it), and I like it. Here is my broad review, please bear […]
How to fix more problems with ASP.net MVC 3 RouteValues
The Problem You want to create urls that look something like https://SomeSite.com/Categories/Industrial/Fasteners/3.8-MM-Titanium-Wrench-Bolts/ so your site can rank extra high when people search for those profitable 3.8 MM Titanium Wrench Bolts. And in natural, RESTful fashion, your site and database is structured so that the Wrench Bolts are in a subcategory of Fasteners, which are part […]