事情要部署一个MVC 2 Web应用程序时绝对检查? [英] things to absolutely check when deploying an MVC 2 web application?

查看:119
本文介绍了事情要部署一个MVC 2 Web应用程序时绝对检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要部署我的第一个MVC Web应用程序到互联网。

I am going to deploy my first MVC web application to the internet.

由于是第一个应用程序使用此框架对我来说,我在想,如果我可以收集关于应该做什么到prevent麻烦一些建议。

As is the first app with this framework for me, I was wondering if I can collect some advices regarding what should be done to prevent troubles.

我对这个问题通用的,这是X pressely进行搜集最不同的答案。

I am generic on the question and this is xpressely done to collect the most various answers.

谢谢!

更新

谢谢大家对你的答案。这个问题不只是关于部署范围,但更是这些示波器:

Thanks everybody for your answers. The question does not just regards the "deploy" scope but even more these scopes:


  • 安全

  • 公共托管

  • 应用程序管理与;操作

总之,一切需要把这个问题从最初的解决部署上。

In short, all the issue that need to be addressed from the initial deploy on.

推荐答案

如果你要在一小时内部署:

If you are going to deploy within the hour:


  1. 确认的参考System.Web.Mvc被标记为复制本地=项目中的真实。它往往默认为False,因此不会被复制到您的bin文件夹,导致部署时,应用程序失败。检查您可能已经添加到项目的复制本地=真正的任何额外的组件。

  1. Make sure the reference to System.Web.Mvc is marked as Copy Local=True in your project. It tends to default to False, and so will not be copied to your bin folder, causing the app to fail when deployed. Review any additional assemblies you may have added to the project for Copy Local=True.

确认堆栈跟踪信息未显示异常时在code发生给最终用户。使用 <&的customErrors GT; 在web.config中指定自己的错误页面(S)。

Make sure stack traces aren't shown to end users when an exception occurs in your code. Use the <customErrors> in web.config to specify your own error page(s).

在你的web.config,请确保连接字符串会你会被部署到服务器上的工作。

In your web.config, make sure that the connection strings will work on the server you'll be deploying to.

是您的应用程序写入磁盘以任何理由?或许记录?一些托管服务不会让你的应用程序写入到磁盘 - 值得一试的时间提前

Is your application writing to disk for any reason? Logging perhaps? Some hosting services will not let your app write to disk -- worth checking ahead of time.

部署到本地文件夹,完整性检查的发布的应用。是脚本,样式表没有加载图像毛刺?

Deploy to a local folder, and sanity-check that published app. Are scripts, stylesheets, images loaded without glitches?

如果你有你的手一点点时间:

If you have a little bit more time on your hands:


  1. 检查code为安全,XSS注意事项:在输入消毒?在视图渲染时是用户输入连接codeD是否正确?

  1. Review the code for security, XSS considerations: are inputs sanitized? Is user input encoded correctly when rendered in views?

查看数据模式。这可能是你修改一个空数据库的最后机会。一旦你部署,你只能希望被轻轻地更新实时数据,试图避免损害现有的应用程序逻辑数据和依赖关系。

Review the data schema. This may be your last opportunity to modify an empty database. Once you deploy, you can only hope to be gently updating live data, trying to avoid harming existing data and dependencies in application logic.

如果您还没有准备好,一定要建立一个谷歌Analytics帐户。你会好奇是如何被使用您的网站,这是提供最好的免费工具之一。 goog分析,以及搜索引擎注册将要求您放置文件,在您的域名的根文件夹时髦的名字。验证您的应用程序可以从根文件夹提供文件,或设置控制器+路由来处理这些请求。

If you haven't already, make sure to set up a google analytics account. You're going to be curious about how your site is being used, and this is one of the best free tools available. Goog analytics, as well as search engine registrations will require you to place files with funky names in the root 'folder' of your domain name. Verify that your app can serve files from the root folder, or set up a controller+routing to handle those requests.

这篇关于事情要部署一个MVC 2 Web应用程序时绝对检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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