Installing ASP.NET MVC 4 Beta breaks ASP.NET MVC 3 RTM applications

We where just bitten by this one and the problem was not immediately obvious. You will see some error like The name ‘model’ does not exist in the current context or ‘System.Web.WebPages.Html.HtmlHelper’ does not contain a definition for ‘ActionLink’ and no extension method ‘ActionLink’ accepting a first argument of type ‘System.Web.WebPages.Html.HtmlHelper’ could be found (are you missing a using directive or an assembly reference?)     Additionally when you check the IntelliSense of @Html you will not see some of the extension methods like Action() or ActionLink()   Fixing it is not hard one you know the problem. Include the … Continue reading Installing ASP.NET MVC 4 Beta breaks ASP.NET MVC 3 RTM applications

Deploying SqlServerCe with an ASP.NET MVC application

Using Entity Framework Code First together with SqlServerCe is a great way to work with small databases in ASP.NET MVC applications. I have several web applications running on shared hosting sites where SqlServerCe is the database engine under the hood. Deploying is also quite easy. I typically use the build in Publish Web option which works great over FTP.   When using SqlServerCe you have to make sure you add the deployable dependencies. Forgetting those results in pretty clear error messages.   However once that is done I always run into another issue. When a page actually tries to use … Continue reading Deploying SqlServerCe with an ASP.NET MVC application

WCF Express Interop Bindings

WCF might use the WS-* SOAP standard for communications but the WS-* specs leave vendors with a lot op maneuvering room when it comes to how to exactly implement things. As a result doing interoperable work between WCF and, for example, an IBM WebSphere server can be quite tricky to setup. Something I have experienced all to often   Fortunately Microsoft has now released the WCF Express Interop Bindings that should make live quite a bit easier. These binding are preconfigured for a number of common platforms like Apache, IBM WebSphere or Oracle WebLogic and should make things quite a … Continue reading WCF Express Interop Bindings

Using the WCF Web API in an ASP.NET MVC application

Warning: This post is based on a prerelease version of the WCF Web API   In my previous blog post I showed how to add to and use the new WCF Web API a console application using NuGet. Now that works but it is far more likely that you will want to be using IIS and host the REST service as part of a web application. So in this blog post I am going to show how to do the normal thing   I Created an ASP.NET MVC 3 app to host the REST service. Not that there is anything … Continue reading Using the WCF Web API in an ASP.NET MVC application

Adding the WCF Web API to a project

Warning: This post is based on a prerelease version of the WCF Web API   In my previous blog post I showed how to get started with the new WCF Web API but one thing I skipped is how to install and add it to your project first. So in post I am going to add that information.   The easiest way to get started is to use NuGet and add the WCF Web API package to your project. There are several different packages for the WCF Web API but  the one named WebApi.All is the easiest to get started … Continue reading Adding the WCF Web API to a project

Entity Framework 4.1 power tools

The EF team at Microsoft just release a first CTP of the EF 4.1 Power Tools making it even easier to do Code First development with an existing database. Guess it isn’t really code first in that case but database first   I did a quick test with an existing database, Northwind to be exact, and it worked pretty well. The only gotcha is you have to make sure the EF4.1 assemblies are available in your project otherwise you will receive the exception below. Adding Ef4.1 is easy though, just download the installer and install them or even better, just … Continue reading Entity Framework 4.1 power tools

Guerrilla Enterprise .NET Copenhagen

For those that attended the Guerrilla Enterprise .NET course last week in Copenhagen and didn’t get a change to download all the sample you can download all the demos Richard Blewett, Dominick Baier and I wrote from here. And thanks for being there, it was a fun event

Inversion of control and WCF

Lots of people like to use in inversion of control container, usually shortened to IOC, to inject dependencies into classes. The are lots of reasons for doing so but in the end they mostly boil down to separation of concern which makes thing more modular and thereby easier to reuse and unit test. When you start doing so manually injecting dependencies into a types constructor is easy enough but after a while this tends to become tedious and getting an IOC container to do this for you is a lot easier. The problem is that you don’t always control the … Continue reading Inversion of control and WCF

SqlWorkflowInstanceStore and SQL Azure

Some time ago I blogged about how to get the SqlWorkflowInstanceStore working with SQL Azure. In order for this to work we had to make a few changes to the SqlWorkflowInstanceStoreSchema.sql script and as a result we ended up in a working but officially not supported scenario. And while this worked just fine with the Windows Azure 1.2 SDK there was a change in the Windows Azure 1.3 SDK which resulted in each deployment being seen in a new service deployment. This last change even happened if no change was made to the workflow service or the assemblies but resulted … Continue reading SqlWorkflowInstanceStore and SQL Azure