0

I have a production server for a project, and I try to build a test server for the same project with the same environment.

For this, I need to install on the test server (that means, no VS or any dev stuff like package managers, etc.) the same version installed on the prod server version of ASP.NET MVC: 4.0.4xxx.

I searched to download the latest ASP.NET MVC 4 installer, and the only download MS proposes is the ASP.NET MVC 4 for Visual Studio 2010 SP1 (don't really understand what has to do here VS 2010 - should it work only with VS?!) - once installed I navigate to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies and the System.Web.Mvc.dll version is 4.0.207xxx.

Where could I find the ASP.NET MVC 4.0.4xxx?

More info:

the .NET installed is enter image description here

the ASP.NET seems to be 4.0.0.0: enter image description here

also enter image description here

Finally, in localhost, I get the following error: enter image description here

serge
  • 13,940
  • 35
  • 121
  • 205
  • try to install by Nuget , here is a link for guid https://www.nuget.org/packages/Microsoft.AspNet.Mvc/4.0.30506 , You can install specific version – Husni Salax Feb 13 '18 at 11:01
  • If you have source codes, try to install System.Web.Mvc.dll with specific version by Nuget. After that you can publish (deploy) into test server – Husni Salax Feb 13 '18 at 11:07
  • This is what I try, to "publish"... I have an obsolete solution, with no automatic publish functionality, I just need to install that ASP.NET MVC version to the server... to make it work... – serge Feb 13 '18 at 11:09
  • See here: https://stackoverflow.com/a/10441585/4640991 – Husni Salax Feb 13 '18 at 11:16
  • thanks... But I am afraid I would **need to full install** it because on my pro server the "C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\AssembliesSystem.Web.Mvc.dll" version is *4.0.4*xxx... – serge Feb 13 '18 at 11:23

1 Answers1

3

Since ASP.NET MVC version 3.0.20105.1, the Microsoft.AspNet.Mvc DLL has been available through NuGet. This means your application should include Microsoft.AspNet.Mvc version 4.0.40804 as part of its distribution (in the bin folder) when your application is published.

The only thing you need to install on a production or test server is the .NET Framework Redistributable 4.0+ in order for ASP.NET MVC 4 to function.

Do note that .NET Framework 4.0 is no longer supported, so it is recommended to use at least Microsoft .NET Framework 4.5.2. All versions of .NET Framework 4.0+ are in-place upgrades, so all higher versions should work with your application without any changes.

There was also a security update that broke compatibility with 4.0.0.0, that will need to be applied to your server if it is not already installed. This updates MVC 4 assembly version from 4.0.0.0 to 4.0.0.1, so it is a breaking change for applications that are compiled against 4.0.0.0. Since your application is looking for 4.0.0.1 (as it should) that means your application is compiled with the security update, but the server needs the security update for MVC 4 installed.

NightOwl888
  • 55,572
  • 24
  • 139
  • 212
  • It appears that the .NET 4.5 and ASP.NET 4.5 are already installed as "server features", see my updated OP... – serge Feb 13 '18 at 13:31
  • any change after installing the .NET Framework 4.7.1, the Mvc still remained "4.0.2xxx".... – serge Feb 13 '18 at 14:01
  • added in OP the localhost's test message that tells the MVC 4.0.0.1 not found (it seems ti finds only the 4.0.0.0 version) – serge Feb 13 '18 at 14:10
  • 2
    Oh, God, Finally, my Error message changed ! Thanks a lot ! just to fix your link to a page with the direct download of the security update: https://support.microsoft.com/en-us/help/2990942/ms14-059-vulnerability-in-asp-net-mvc-could-allow-security-feature-byp – serge Feb 13 '18 at 15:05