Monday, January 23, 2012

Best Practices for Deployment of ASP.NET Applications Production

Best Practices for Deployment of ASP.NET Applications Production

Compress file.
Compress JavaScript & aspx HTML file before deployment. This will reduce the size of file which optimizing rendering time.

Caching of static data.
Set the Cache of static content like images. or web page which have no user specific.

Set httpRuntime executionTimeout
If application may be accessed by slow internet connection then it wise step to increase execution time out.
We can set it on Web config file
<httpRuntime executionTimeout="seconds" />

Build Mode release
When application is about to deplaoy than builds it by release mode.
In release mode we have less information of error.

deployment retail

Set retail="true" in your machine.config
<configuration>
<system.web>
<deployment retail="true"/>
</system.web>
</configuration>

1. It will force the 'debug' flag in the web.config to be false, 
2. It will disable page output tracing, and 
3. It will force the custom error page to be shown to remote users rather than the actual exception or error message.

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.

app_Offline.htm
It also force an application restart in case you forget to do this for a deployment

No comments: