views:

28

answers:

1

So far I've migrated two ASP.NET MVC 1 solutions to MVC 2 and therefore kept my web.config almost the same, just changed the necessary stuff in it as documented in Release notes.

Although I created a few new test MVC 2 webapss from scratch, until now I haven't really checked out the default new web.config. As I created a new empty MVC 2 Web App today and opened the web.config, I discovered it's much smaller. There's almost no modules, no handlers, etc.

Now I'm thinking to move some pieces from old web.config into this new one (like nhaml section, membership section, ...)

I was wondering about how others tackle the problem of changing web.config files over time and what are yours best practices.

+1  A: 

The web.config file grew with .NET 3.0 and .NET 3.5 due to the fact that they still used CLR 2.0. This meant that any extra assemblies required for new 3.0/3.5 specific features had to be added explicitly - the CLR didn't know they were needed.

New projects target version .NET 4.0 by default and in turn CLR 4.0 which knows about the extra 3.0/3.5/4.0 assmblies.

I would imagine that the web.config will grow again when ASP.NET 5.0 comes out and still uses CLR 4.0!

starskythehutch