When you are building a website you will sooner or later want to build in some kind of Identification and Authorisation control to make sure not everyone can change your website or see sensitive information. In this tutorial I will show you how to build in simple Identification and Authorisation in your ASP.NET MVC website.
Recently I was working on a ASP.NET MVC application where users could add budgets. The budgets were saved as floats. The problem was that some users used a (.) as decimal and others a (,). It depends on which culture setting your application is running if ModelState.isValid is true or false in such case. The culture setting in which your application runs depends on the system on which it is running. This is not a desired behaviour. Its better to specify the culture in the application itself and force users to use a (.) or (,). To run an ASP.NET MVC application in a specific culture setting you can add the following code to your Global.asax file:
public class MvcApplication : System.Web.HttpApplication
protected void Application_AcquireRequestState(object sender, EventArgs e)
var culture = CultureInfo.CreateSpecificCulture("nl-NL");
Thread.CurrentThread.CurrentUICulture = culture;
Thread.CurrentThread.CurrentCulture = culture;
When I First heard about the Entity Framework I thought there was only one correct way of implementing it and that is using the Code First approach. Now I am not that sure anymore. In this article I will explain the various approaches and their advantages and disadvantages.
Today I was working on a project that uses EPiServer version 6. As you probably know EPiServer 6 is still using webforms, not MVC. For SEO optimalisation we needed to rewrite incoming URL’s to make them uniform. For example all these URL’s should go to the same page
For SEO it is important that there is only one valid URL. Other URL’s should throw a statuscode 301 and redirect to the correct url. For this I needed to do some URL rewriting in EPiServer.
Sometimes you want to store settings in a config file like web.config or app.config for your modules. In this small tutorial I will show you how to do that. I will not only show you how to define your own sections but also how to put this config in a separate file.
In this post I take a look at what blob storage exactly is, why it could be interesting and how it works in EPiServer. By default EPiServer uses blob storage to store all its content. Further I take a look at how to access stored media assets from code and show them in a view and how to save an uploaded image as a blob in the Media panel.
Sometimes you want to able to save data that is not a page or a content block. Examples could be data like comments created by visitors or orders in your webshop. An easy way to save such data is using EPiServers build-in Dynamic Data Store.
Since a couple of weeks when I started with EPiServer I experimented a lot. Here is a quick summary of some code fragments that I found on the internet that can be very usefull in some cases. I am not going into detail about these code fragments because honestly I dont understand all of it (yet).
In this tutorial we will add Twitter Bootstrap to our EPiServer project and we will create some base classes and our first ViewModel. Further I will explain the purpose of these base classes and the need for a ViewModel. Most of this is standard ASP.NET MVC so if you are already familiar with that you can probably skip this post.
Welcome to my first blog where I will start explaining how to create a simple website that uses EPiServer 7.5 as CMS. In the next tutorials I will extend the functionality of the website and I will dive deeper in more advance topics related to EPiServer. I assume that you have basic knowledge about the CMS itself. In other words that you know how to work with the CMS itself.