Monday, January 23, 2012

JQuery and update panel.

JQuery and update panel.

We faced problem when we have update panel and using .ready function of jquery.
than on asysnc request of update panel Jquery .ready is not fired than we have to use add_load of sys.Application class of scrip manager library.

$(document).ready(function IwillCallWhenPgeIsReady(
//IF you have update panel than it will never call on async request
Update Panel:
Sys.Application.add_load(function() {});

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
<deployment retail="true"/>

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

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