Krunal Mevada

Because there’s always more to learn

My First MVC Application

Everywhere, in weblogs, i read about the MVC Beta.

After reading decided to build a small application and tried to develop sample tasklist mvc application by following the First Tutorial.

I enjoyed it and getting working on VS 2008 & its development web server.

Then, i had published it to my iis 5.1 (i am using windows xp sp2 and vs2008).

And then the things were goes wrong. Got stuck in "page not found error".

I look around on the net for this, and got one solution for this.

For that i have to change the Global.asax & little configuration in IIS

Global.asax Change:
routes.MapRoute(
                "Default",                                              // Route name
                "{controller}.mvc/{action}/{id}",                           // URL with parameters
                new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
            );

IIS Config Change:
Map the extension (.mvc) in IIS to the asp.net pipeline

It will looks like this : http://localhost/TaskList/Home.mvc

http://localhost/Site/controller.mvc/action


Finally, my first mvc application worked in windows xp. :)

You can download the code here.

Enjoy,
Krunal

Posted: Oct 23 2008, 03:06 AM by krunalm | with 4 comment(s)
Filed under: , ,

Comments

Jayesh said:

Very Nice Application.

# October 23, 2008 6:40 AM

Ralax said:

Congratulations!

# October 25, 2008 3:12 AM

Jen said:

Helpfull blog...

# November 11, 2008 5:19 AM

Matthew said:

I've just completed my first MVC live website using RC1, if you wan to check it out the address is www.erealestate.co.nz.  Being able to have control html was a please to work with, put a lot more fun back into web development.

# February 23, 2009 1:25 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)