Friday, August 04, 2006

Best practises for ASP.NET web sites developers

Good article by Jeff Prosise explaining typical ASP.NET development pitfals:
Keep Sites Running Smoothly By Avoiding These 10 Common ASP.NET Pitfalls

Here's the bottom line from the article:
- Does your app use LoadControl to load user controls dynamically? If so, make sure this is done in such a way that LoadControl will work both with and without output caching.
- Are you using kernel-mode output caching and session state in the same page? If so, remove the OutputCache directive to avoid caching that page or turn kernel-mode output caching off for the entire app.
- Are you calling FormsAuthentication.RedirectFromLoginPage in your ASP.NET 1.x-based app? If so, either change the second parameter to false or modify the Expires property of outgoing persistent forms authentication cookies to a more appropriate timeout.
- Do any of your pages generate inordinate amounts of view state? If so, turn off view state for individual controls or keep it on the server.
- Does your app use SQL Server session state? If so, make sure you disable sessions in pages that don’t use sessions.
- Does your app use the ASP.NET 2.0 role manager? If so, enable role caching to increase performance.
- Does your app use custom data types as profile properties? If so, you'll avoid problems by creating custom data types that are compatible with XML serialization or by attributing the types as serializable and using the binary serializer to serialize and deserialize types.
- Does your app do database queries that take a long time to return? If so, consider whether the pages are candidates for becoming asynchronous.
- Does your ASP.NET app use client impersonation? If so, simple authentication in ASP.NET might enforce ACL-based permissions with less hassle.
- Have you profiled your app’s database activity? Examining communication between the app and database is a good first performance-tuning step.

No comments:

Followers

About Me

My photo
Email me: blog@postjobfree.com