gpt4 book ai didi

asp.net-mvc - ASP.net MVC 项目未在 IIS 上编译

转载 作者:行者123 更新时间:2023-12-01 09:10:30 26 4
gpt4 key购买 nike

我以前只是把asp.net网站上传到live server,IIS会自动编译。

但是当我对 asp.net MVC 项目做同样的事情时,我只会得到错误,我需要在上传之前发布构建项目。

注意 1:我使用的是 VWD 2008 Express

注意2:如果我在我的机器上发布构建它然后上传到服务器,该项目运行良好

最佳答案

Charles Boyung的评论应该被视为一个答案。

MVC applications are like Web Projects, not Web Sites in Visual Studio - they must be compiled before deployment. –

不在服务器上编译是 Web 应用程序项目 (WAP) 和网站项目 (WSP) 之间的区别之一

http://vishaljoshi.blogspot.com/2009/08/web-application-project-vs-web-site.html

Q1. Do you intend to deploy source code on your production server and edit it right on the server if there was a time sensitive bug reported ?

If you answered Yes to the above question, you want to use Web Site projects (WSPs)… In case of Web Site projects Visual Studio does not really compile your source code on your dev box, it merely uses aspnet_compiler to validate that your source code will actually compile and run on the server… Hence when you try to deploy a web site people typically also deploy the source code on the server which allows them to edit the source right on the production server if there was a time sensitive bug reported

关于asp.net-mvc - ASP.net MVC 项目未在 IIS 上编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1502956/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com