none
ASP.NET MVC 2 hosting on Windows Server 2003 R2 sp2 RRS feed

  • Question

  • I'm supposed to deploy a project on Windows 2003 R2 SP2, Microsoft II 6.0, .NET 2.0 Framework. Initially I was intending to install .net 4 so that I can use ASP.NET mvc 3; however, there is no third party software will be allowed to install on that platform. To be exact, I am given this thing Windows 2003 R2 SP2, Microsoft II 6.0, .NET 2.0 Framework, and that's it.

    From what I understand is that we can deploy asp.net mvc 2 (targeting .net 3.5) on the server using CLR 2.0 since .net 3.5 is nothing more than extra libraries that base on CLR 2.0. Can anyone clarify if I can use asp.net mvc 2 (with .net 3.5) to deploy the mentioned platform)?

    Saturday, November 5, 2011 5:39 PM

Answers

  • Singachea,

    Unfortunately this is going to be a problem, because MVC 2 requires some of the extra .NET 3.5 specific libraries.  You can confirm this if you go to your MVC 2 project and try to change the target framework to .NET 2.0.  It will give an error that it is only supported in .NET 3.5 or higher.

    So, your only option is to somehow get .NET 3.5 installed on that server.  I just can't think of any workaround.

     


    Tom Overton
    Sunday, November 6, 2011 12:14 AM
  • If you want prompt answer, I would suggest to ask on http://forums.asp.net.

    I am not sure if I understand your "copy all the *.dll files. If you plan to copy some .NET 3.5 assemblies into machine with .NET 2.0 only, then it is a very bad idea - it is not legaly allowed and it will most likely not work. .NET 3.5 is more than just few additional assemblies, it is also replacement of .NET 2.0 (with new APIs).
    If you need .NET 3.5 on your target machine, just make it as requirement in your application. AFAIK you can even redistribute .NET Framework with your application, so just make sure it is installed before your application that depends on .NET 3.5.

    -Karel

    Tuesday, November 8, 2011 4:24 AM
    Moderator

All replies

  • Singachea,

    Unfortunately this is going to be a problem, because MVC 2 requires some of the extra .NET 3.5 specific libraries.  You can confirm this if you go to your MVC 2 project and try to change the target framework to .NET 2.0.  It will give an error that it is only supported in .NET 3.5 or higher.

    So, your only option is to somehow get .NET 3.5 installed on that server.  I just can't think of any workaround.

     


    Tom Overton
    Sunday, November 6, 2011 12:14 AM
  • Hi Tom,

     

    Thanks for you reply. I agree that we need minimum .net 3.5 for asp.net mvc development, but would it be a problem when I deploy the compiled package (assume I use pure .net 2.0 (e.g. no Linq, or simply use Linqbridge) for *.aspx view as it's interpreted at run-time)? 

    I still wonder if we can use local copy of *.dll to the server, and thus it should be able to stand on CLR 2.0. The worse point is that the server is not ready until the end of this month of which I'm supposed to deliver the project by that time. 

    Sunday, November 6, 2011 6:57 AM
  • Singachea,

    I'm almost certain even using non-3.5 specific features in your code would not allow it to run under .NET 2.0 only.  Because if you look at your references for any MVC 2 program, you will see that many DLL's are version 3.5  (System.Web.Entity, System.Web.Routing, System.XML.Linq, System.Web.Entensions).

    In particular, System.Web.Routing being version 3.5 means it's impossible to not require 3.5 on the server because you have to use System.Web.Routing.RouteCollection in even the most simplest MVC 2 application, even a "hello world" program.  

    But I guess all you can do is try it on a test machine with only 2.0 installed to find out for sure. 


    Tom Overton

    • Edited by Tom_Overton Sunday, November 6, 2011 11:35 AM
    Sunday, November 6, 2011 11:30 AM
  • Hi Tom

    Yes, you are right. When I create asp.net mvc2 with .net 3.5, I can see all the libraries (*.dll) are version 3.5 something; however all of them at same time are using Runtime 2.0. I reckon that it should be able to work (by copying along all the *.dll files) on .net 2.0 machine which also uses runtime 2.0.

    From what I have tried, I can run asp.net mvc2 with runtime 2.0 in the application pool in IIS. This is absolutely working on my machine (because I have framework until .net 4.0), but I'm not sure if it's going to work if I deploy on bare .net 2.0 machine. 

     

    Monday, November 7, 2011 6:26 AM
  • If you want prompt answer, I would suggest to ask on http://forums.asp.net.

    I am not sure if I understand your "copy all the *.dll files. If you plan to copy some .NET 3.5 assemblies into machine with .NET 2.0 only, then it is a very bad idea - it is not legaly allowed and it will most likely not work. .NET 3.5 is more than just few additional assemblies, it is also replacement of .NET 2.0 (with new APIs).
    If you need .NET 3.5 on your target machine, just make it as requirement in your application. AFAIK you can even redistribute .NET Framework with your application, so just make sure it is installed before your application that depends on .NET 3.5.

    -Karel

    Tuesday, November 8, 2011 4:24 AM
    Moderator