Status update?

Mar 2, 2010 at 10:49 PM


I've been following your blog and have been looking closely at using your code as the basis for a project I am working on. Thank you for spending time putting it together and making it public.

I do have a few quick questions.

For the MvcEx sample code, how do I select between the core and the premium versions? What do I browse to? Would the production configuration be the same? How would you run core vs. premium using the built-in Visual Studio web server or do you have to set up host headers in IIS?

Using host headers in production is fine (, etc.). However, for debugging and development, using a flag on the query string is very handy (http://localhost:16695/?site=core). It lets you quickly switch between sites as needed.

Lastly, are we going to be seeing a new blog post soon? :)

Thanks again! Nice job.


Mar 3, 2010 at 8:30 AM
Edited Mar 3, 2010 at 8:30 AM

Thanks :)

The process of selecting a configuration is done via a IMvcExApplicationConfigurationSelector, which will be queried from time to time to find out what the current configuration is.

I find when testing very simple sites, that just hard coding one to return a certain value works fine - but of course you could make it look at the current query string and choose configuration from that.. or look at session or what have you.

A very basic one looks like this:

public class DefaultConfigurationSelector : IMvcExApplicationConfigurationSelector


        public string GetActiveConfigurationId()


            // Fall back to default

           return "default";




You can set this up in MvcEx like this:


mApplication.SetConfigurationSelector(new DefaultConfigurationSelector());


Where mApplication is your MvcExApplication


I can't remember which one the demo uses off hand - but you can see it's easy to write your own hard coded one (or query string based one)


A new blog post will be incoming after my current work deadline - very stressed this past couple of weeks! :)


Mar 3, 2010 at 10:50 PM

Thanks for the reply. I now understand how configuration works.