locked
Which is which ??? Nuget package managers for Old versions of MVC 3.0 RRS feed

  • Question

  • User-973886032 posted

    Hi guys

    I just inherited a new project to troubleshoot an old MVC 3.0 project. Unfortunately I havent worked with version 3.0 before, only later version and have a few questions

    <add key="webpages:Version" value"3.0.0.0" />

    A few questions.

    1. The Login pages does not have the [HttpPost] or [HttpGet] Attributes, does this matter for older versions, or could it be a security flaw ?

    2. I am trying to restore the relevant nugget packages, and it keeps giving errors. HOw do I know which is the correct version to install,

    • e.g. It says Session["login"] does not exist
    • Namespace 'Controller' could not be found  (are you missing a using directive or assembly.... (Same error for return View, ActionExecuting, ActionResults etc

    I know these are MVC framework classes, but which version of the NPM do I install ?

    Any Advice ?

    thank you

    Sunday, November 8, 2020 8:48 PM

All replies

  • User1120430333 posted

    I think you have project structure problems, such as namespace problems, like a using statment pointing to a namespace to be used in the project. You don't have problems concerning  what version of ASP.NET MVC is being used or what versions of DLL(s) are being restored by Nuget. 

    You don't need an HTTPGet that is the default attribute assigned to any action methods that doesn't have the HTTPGet attribute decorating the method. Of course, the login pages may not be trying to post anything and they don't need an HTTPPost.

    It's just my opinion.

     

    Sunday, November 8, 2020 9:15 PM
  • User-474980206 posted

    Ancient history. Mvc 3 in stalled from a download, which places most of it in the gac. While it supports nuget, it is not made up of nuget packages.it does require npm, so any npm packages you have were manually added. It’s the build tools you need to determine.  In mvc 3 days it was probably grunt. In mvc 3 days, visual studio installed node.

    Google for the mvc 3 download and install. Mvc 3 is .net 4.0, which is no longer supported. I’d upgrade to mvc 5 and current razor and 4.8. Set project setting to compile razor, as there were some syntax changes. Mvc code is real compatible. Should take only couple hours to upgrade. The other issue will be encryption, you may need to down level.

    Sunday, November 8, 2020 9:59 PM
  • User1120430333 posted

    Google for the mvc 3 download and install. Mvc 3 is .net 4.0, which is no longer supported. I’d upgrade to mvc 5 and current razor and 4.8. Set project setting to compile razor, as there were some syntax changes. Mvc code is real compatible. Should take only couple hours to upgrade. The other issue will be encryption, you may need to down level.

    It's not that simple that one can upgrade to another version. Some companies freeze a solution at a certain version and leave it in moth balls in a code repository branch, because a client will not pay for a newer version of a solution. But they have a support and maintenance contract and any enhancements or fixes must be made to the moth balled version of the solution the client has with a support and maintenance contract for that version of the solution.

    Monday, November 9, 2020 8:06 AM
  • User-474980206 posted

    I know companies are slow to upgrade, but the typical compelling argument is that Microsoft will not support (even security fixes) such an old version. In case of a data breech, this can be seen as negligence. 

    Monday, November 9, 2020 3:22 PM
  • User1120430333 posted

    I know companies are slow to upgrade, but the typical compelling argument is that Microsoft will not support (even security fixes) such an old version. In case of a data breech, this can be seen as negligence. 

     

    What I am stating applies more to vendors that supply a specialized Web solution in a given market. A  client  has brought the software, and it is setting at a version and using a version of the .NET framework. While the vendor company is upgrading the software with enhancements and keeping pace with the .NET framework releases, it doesn't mean that a given client will keep pace, becuase the new software release must be paid for, a support team must do the software install on site and data conversions that cost the client money. So the client has its paid for version of the software, they pay for new enhancements and support for the version they have at its site. 

    I worked on versions of the vendor software that was using classic ASP, ASP.NET Web form and ASP.NET MVC the same basic software functionality with different versions of the software using different runtimes based what the user had purchased or worked on what was going to be released as the latest and greatest. 

    It was a rude awakening. :)

    Monday, November 9, 2020 6:47 PM