While working with Database in ASP.Net web applications, database connections are the most critical and expensive part especially in multi tier web applications. It becomes important where to store the connection strings securely and separately from application logic layer and presentation layer (*.aspx). Developers and web architects providing design patterns have to decide carefully that where to store the connection strings.
In ASP.Net you should follow the following easy guidelines to improve the web application performance while working with large databases to store and retrieve the data.
Improve the application scalability by managing well designed Data Access Layer (DAL) that could work like a transformer and multiplex the database connections for the multiple client requests.
Apply the properly managed connection pooling technique to avoid the database connection pool leakage and connection errors/exceptions.
You can use Windows Authentication while connecting SQL Server Databases.
Store connection strings securely separate from the compiled code.
Open database connections late whenever needed and don’t let it open useless, close database connection immediately right after its use to send it back to the connection pool for reuse.
Further we will discuss about the different ADO.Net Data Providers for .Net along with their connection pooling methodology, coz mechanism varies for each provider.
Be the first to rate this post
Tags: asp.net, ado.net, database connection, data access layer, dal, asp.net data access model
8/23/2008 8:51:37 PM