惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
腾讯CDC
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
量子位
博客园 - 聂微东
Jina AI
Jina AI
小众软件
小众软件
The Cloudflare Blog
有赞技术团队
有赞技术团队
V
V2EX
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
B
Blog
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
宝玉的分享
宝玉的分享
C
Check Point Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
N
Netflix TechBlog - Medium
I
InfoQ
J
Java Code Geeks
S
SegmentFault 最新的问题
V
Visual Studio Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog RSS Feed
S
Schneier on Security
Webroot Blog
Webroot Blog
P
Proofpoint News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
Project Zero
Project Zero
Scott Helme
Scott Helme
C
CERT Recently Published Vulnerability Notes
P
Privacy International News Feed
T
The Exploit Database - CXSecurity.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security

博客园 - cncxz(虫虫)

在.NET环境下为网站增加IP过滤功能 推荐几个基于.net的cms系统 超赞的10个Windows Live Writer插件 一个基于web的pdf浏览器 ajax跨域访问代理文件下载(asp、php、asp.net) jQuery UI 1.0 已于2007-9-16日正式发布 Visual Studio插件大搜索(60+) 推荐一批基于web的开源html文本编辑器(40+) 终结IE6下背景图片闪烁问题 一个web应用程序统计在线用户列表的东东(带c#源码) 中了网络流氓www.e-jok.cn的招 使用 javascript 标记高亮关键词 Div+Css酷站一箩筐 在win2k3上使用卡巴斯基6.0 发布控件Express.NET.WindowsForms运行时的本地化补丁 创建为ClickOnce清单签名的.pfx格式数字证书 Windows Live Messenger去广告补丁 一个阴历阳历互相转化的类(c#源码) 小发现:sql2005中的异常处理消息框可以直接使用
发布ASP.NET应用程序时的10个好习惯(转)
cncxz(虫虫) · 2008-02-15 · via 博客园 - cncxz(虫虫)

【markcxz摘录】这是发布ASP.NET应用程序时值得注意的十点内容(个人归纳,排名不分先后),但愿能给你的开发带来些许助益。欢迎补充新的观点和项目。
In no particular order, here are the top ten things I've learned to pay attention to when dealing with production ASP.NET applications. Hopefully they will help you save you some time and headaches. As always, your thoughts and additions are welcome.

  • 创建新的密钥
    Generate new encryption keys

    When moving an application to production for the first time it is a good idea to generate new encryption keys. This includes the machine validation key and decryption key as well as any other custom keys your application may be using. There is an article on CodeProject(http://www.codeproject.com/KB/aspnet/machineKey.aspx) that talks about generating machineKeys specifically that should be helpful with this.

  • 加密web.config中的敏感配置节点
    Encrypt sensitive sections of your web.config
  • 使用可信任的SQL连接
    Use trusted SQL connections
  • 在machine.config中设置retail为true
    Set retail="true" in your machine.config

    <configuration>
    <system.web>
    <deployment retail="true"/>
    </system.web>
    </configuration>
    TThis will kill three birds with one stone. It will force the 'debug' flag in the b.config to be false, it will disable page output tracing, and it will force the custom error page to be shown to remote users rather than the actual exception or error message. For more information you can read Scott Guthrie's post(http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx) or the MSDN reference(http://msdn2.microsoft.com/en-us/library/ms228298(VS.80).aspx).

  • 为站点创建独立的应用程序池
    Create a new application pool for your site

    When setting up your new site for the first time do not share an existing application pool. Create a new application pool which will be used by only by the new web application.

  • 为应用程序池设置最大可用内存
    Set the memory limit for your application pool

    When creating the application pool, specifically set the memory limit rather than the time limit which is set by default. http://www.asp.net has a good whitepaper(http://www.asp.net/learn/whitepapers/aspnet-and-iis6/) which explains the value of this:

    By default IIS 6.0 does not set a limit on the amount of memory that IIS is allowed to use. ASP.NET’s Cache feature relies on a limitation of memory so the Cache can proactively remove unused items from memory.

    It is recommended that you configure the memory recycling feature of IIS 6.0.

  • 创建并适时使用app_Offline.htm文件件
    Create and appropriately use an app_Offline.htm file

    TThere are many benefits to using this file. It provides an easy way to take your application offline in a somewhat user friendly way (you can at least have a pretty explanation) while fixing critical issues or pushing a major update. It also forces an application restart in case you forget to do this for a deployment. Once again, ScottGu is the best source(http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx) for more information on this.

  • 实现可重复、易操作的部署功能
    Develop a repeatable deployment process and automate it

    It is way too easy to make mistakes when deploying any type of software. This is especially the case with software that uses configuration files that may be different between the development, staging, or production environments. I would argue that the process you come up with is not nearly as important as it being easily repeatable and automated. You can fine tune the process as needed, but you don't want a simple typo to bring a site down.

  • 确保生成和引用的相关程序集均为release版本
    Build and reference release versions of all assemblies

    In addition to making sure ASP.NET is not configured in debug mode, also make sure that your assemblies are not debug assemblies. There are of course exceptions if you are trying to solve a unique issue in your production environment ... but in most cases you should always deploy with release builds for all assemblies.

  • 加载测试  负载测试
    Load test

    This goes without saying. Inevitably, good load testing will uncover threading and memory issues not otherwise considered.

原文地址:http://daptivate.com/archive/2008/02/12/top-10-best-practices-for-production-asp-net-applications.aspx