ASP.net MVC项目不在IIS上编译 [英] ASP.net MVC project not compiling on IIS

查看:140
本文介绍了ASP.net MVC项目不在IIS上编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前只是将asp.net网站上传到活动服务器,IIS会自动编译它们。



但是当我对asp.net MVC项目

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

/ p>

注意2:如果我在我的计算机上发布构建版本,然后上传到服务器,项目将正常工作 div class =h2_lin>解决方案

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


MVC应用程序就像Web
项目,而不是Visual
Studio中的网站必须在
部署之前编译。 -


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



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


Q1。您是否打算在生产服务器上部署源代码,并在服务器上进行编辑?是否报告了时间敏感的错误?



到上面的
问题,你想使用网站
项目(WSP)...在网站的情况下
项目Visual Studio不真的
编译你的dev上的源代码
框,它只是使用aspnet_compiler到
验证你的源代码将
实际上编译并运行在
服务器...因此,当您尝试部署
a网站的人通常还
在服务器上部署源代码
,这允许他们在生产服务器上编辑源代码
,如果
有一个时间敏感的bug
报告



I used to just upload asp.net websites to the live server, and IIS compiles them automatically.

But when I do the same with asp.net MVC projects I just get errors, and I need to release Build the project before I upload it.

Note1: I'm using VWD 2008 Express

Note2: The project is working perfectly if I release build it on my machine then upload to the server

解决方案

Charles Boyung's comment should have been considered as an answer.

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

Being not compiling on the server is one of the difference points between Web Application Projects (WAPs) and Web Site Projects (WSPs)

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项目不在IIS上编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆