tags:

views:

340

answers:

2

In WebForms we can leave the compilation until the first request in IIS. It is then compiled and requests are served.

In ASP.NET MVC can I do the same thing, or do I have to pre-compile the app?

+3  A: 

You don't need to pre-compile if you don't want to. ASP.NET MVC is only a wrapper around existing ASP.NET structures.

Daniel A. White
Thank you. Now that I know I can do it, I'll continue trying to actually get it to work.
TheTodd
Make sure the dll's are in your bin directory fyi.
Daniel A. White
The dll's for mvc that is.
Daniel A. White
The MVC dll's are in the GAC.
TheTodd
Also, the trick to doing this is that you have to put your Controller and Model code in the App_Code folder so that it is compiled on first request.
TheTodd
+1  A: 

It is upto you whether you want to use the precompilation tool or not to speed up the first request. Does not matter whether the app is Webforms or MVC.

Gulzar