How to install ASP.NET MVC 5 on a server?

前端 未结 4 816
故里飘歌
故里飘歌 2021-02-12 19:31

I just updated my website from MVC 4 to MVC 5.

Now when I want to run it on my web server instead of my development machine it does not work.

It think it is beca

相关标签:
4条回答
  • 2021-02-12 19:39

    The best is to do a Publish, right click on your project in Solution Explorer and select 'Publish'. Basically it will compile your solution and dump all the assemblies/artifacts to either your webserver, ftp or a local folder.

    0 讨论(0)
  • 2021-02-12 19:50

    When you deploy your app just make sure that all the assemblies are being deployed to your production environment in the bin folder. ASP.NET MVC is an xCopy deployment, so you don't have to install anything.

    You might want to check that your Production environment has ASP.NET 4.0 and 4.5 registered.

    0 讨论(0)
  • 2021-02-12 19:54

    Make sure all your assembly references are being copied to the deployment directory. To do this you can change the <Reference...> tag in your .project file. Optionally, you can use visual studio's property setter to set the "Copy Local" property of each dll reference to "True".

    0 讨论(0)
  • 2021-02-12 19:55

    MVC5 and future version of MVC doesn't require to installed on Windows Server. MVC5 app have everything as packages. You didn't need anything to install it.

    What is required on server is copy of every library and assembly that you have used in your app. For fix this, Just make sure that everything on your bin folder is called same on server instead of server is looking for it's own GAC for assembly used in your app.


    If you didn't found all the packages then you can install nuget packages on server by cmd.

    0 讨论(0)
提交回复
热议问题