MVC部署,而无需取下整个网站 [英] Deploy MVC without having to take down the whole site

查看:98
本文介绍了MVC部署,而无需取下整个网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,可以说,我想就我为我的MVC项目视图之一更改一些内容。很简单的东西就像拿出一个句子或添加了一段什么的。因此,从我所看到的,我一定要重新发布整个网站,然后采取了整个网站,并与新发布设置设为替换它。

So lets say I want to make a change to some content on one of my views for my MVC project. Something really simple like taking out a sentence or adding a period or something. So from what I see, I have to republish the entire site, then take down the whole site and replace it with the newly publish set.

我不知道是否有一种方式,如果我做出改变单个页面的内容,我可以只更换单页,而不必更换整个网站。我记得在网页表单,如果我做了一个变化,我可以代替单个页面。思考?

I was wondering if there was a way, if I make a change to a single page's content that I could just replace the single page, without having to replace the entire site. I remember in web forms I could replace a single page if I made a change. Thoughts ?

推荐答案

内容驻留在其中的莫过于ASPX文件以外的浏览目录。
欲了解aspx页面的第一要求,它是由ASP.NET服务器(IIS)编译和缓存在服务器上提供进一步的请求。

The content resides in a View directory which are none other than aspx files. For the very first request for the aspx page, it is compiled by the ASP.NET Server(IIS) and cached on the server for serving further requests.

所以,你可以只是更换新的内容aspx文件(各视图的文件夹),并随后将编为第一个请求。没有必要放下整个网站。

So you can just replace the aspx file(in respective View's folder) with new content and it will be subsequently compiled for the first request. There is no need to put down the whole site.

有关在生命周期的更多信息

http://msdn.microsoft.com/en-us/library/ ms178472.aspx

<一个href=\"http://stackoverflow.com/questions/460145/what-is-the-page-lifecycle-of-an-asp-net-mvc-page-compared-to-asp-net-webforms\">http://stackoverflow.com/questions/460145/what-is-the-page-lifecycle-of-an-asp-net-mvc-page-compared-to-asp-net-webforms

这篇关于MVC部署,而无需取下整个网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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