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

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

问题描述

我曾经将asp.net网站上传到实时服务器,IIS自动编译它们。



但是当我使用asp.net MVC项目时我只是收到错误,我需要在上传之前发布Build项目。



注1:我正在使用VWD 2008 Express / p>

注2:如果我发布在我的机器上构建它,然后上传到服务器,该项目正常工作

解决方案

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不真的
编译你的源代码在你的开发
框,它只使用aspnet_compiler到
验证您的源代码将
实际上编译并运行在
服务器上...因此,当您尝试部署
a网站人通常还有
在服务器
上部署源代码,允许他们在生产服务器上编辑源
,如果
有时间敏感的错误
报告



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天全站免登陆