Monday, April 11, 2011

Improving the ASP.Net application performance

Few points to keep in mind while developing and deploying ASP.Net application.

Create new application pool for your site and ensure that only your application uses this pool.

In machine.config file , set the “retail=true” which will set the debug and tracing options to false . Disabling debug and tracing features for production application will improve the performance.

Implement Ajax wherever possible, this will reduce the full page refresh and increases the application performance by refreshing the parts of the page.

Implement Client side validations instead of using server validation controls. This will decrease the round trips to the server.

Disable the view state for entire page when not needed. Using view state simply will become overhead for webpage and it impacts the page load time.

Don’t store larger amounts of data in sessions . Using sessions will increase the memory consumption at server and brings down the server performance.

Use try/catch/finally blocks only when you are implementing complex functions . Use of exception handling for every simple function will hit the performance.


















Friday, April 8, 2011

Enterprise Library

The Microsoft Enterprise Library is a collection of reusable software components (application blocks) designed to assist software developers with common enterprise development cross-cutting concerns (such as logging, validation, data access, exception handling, and many others).
Software developers can add application blocks to .NET applications quickly and easily. For example, the Data Access Application Block provides access to the most frequently used features of ADO.NET, exposing them through easily used classes


Enterprise Library is a collection of application blocks intended for use by developers who build complex, enterprise-level applications

Advantages :

Consistency. All Enterprise Library application blocks feature consistent design patterns and implementation approaches.



Extensibility. All application blocks include defined extensibility points that allow developers to customize the behavior of the application blocks by adding their own code.



Ease of use. Enterprise Library offers numerous usability improvements, including a graphical configuration tool, a simpler installation procedure, and clearer and more complete documentation and samples.



Integration. Enterprise Library application blocks are designed to work well together or individually.


Microsoft Enterprise Library 5.0 contains the following application blocks:






Caching Application Block. Developers can use this application block to incorporate a cache in their applications. Pluggable cache providers and persistent backing stores are supported.



Cryptography Application Block. Developers can use this application block to incorporate hashing and symmetric encryption in their applications.


Data Access Application Block. Developers can use this application block to incorporate standard database functionality in their applications, including both synchronous and asynchronous data access and returning data in a range of formats.



Exception Handling Application Block. Developers and policy makers can use this application block to create a consistent strategy for processing exceptions that occur throughout the architectural layers of enterprise applications.



Logging Application Block. Developers can use this application block to include logging functionality for a wide range of logging targets in their applications. This release further improves logging performance.



Policy Injection Application Block. Powered by the Interception mechanism built in Unity, this application block can be used to implement interception policies to streamline the implementation of common features, such as logging, caching, exception handling, and validation, across a system.



Security Application Block. Developers can use this application block to incorporate authorization and security caching functionality in their applications.


Unity Application Block. Developers can use this application block as a lightweight and extensible dependency injection container with support for constructor, property, and method call injection, as well as instance and type interception.

Validation Application Block. Developers can use this application block to create validation rules for business objects that can be used across different layers of their applications.



Hands on Labs available at :

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=4f8cd377-5522-4f45-a024-44a6ca5111ec&displaylang=en














Friday, April 1, 2011

Generating metadata from Type Library

COM type definitions usually reside in a type library. In contrast, CLS-compliant compilers produce type metadata in an assembly. The two sources of type information are quite different.


Here is the tutorial that describes techniques on how to generate metadata from a type library. The resulting assembly is called an interop assembly.

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