ASP.NET Best practices

added by vijayst
11/16/2011 12:03:21 PM

8 Kicks, 764 Views

The post gives some of the best practices that can be used while programming an ASP.NET web application.


11/17/2011 10:34:22 AM
I'm a bit skeptical about his advice to not use a foreach loop. I'd also like to know where he got 20 session variables from, even that seems like too much. Are there any numbers to support either claim?

He also left out 2 things more important that the number of session variables: cookie-less domains for static content, and a separate subdomain for static content.

11/17/2011 8:56:12 PM
Even, I was not in complete agreement. Setting deployment=retail in machine.config is not a good idea. It should be done only in production environments.

11/18/2011 9:25:16 AM
What does that setting do in non-production environments?

11/19/2011 7:53:07 AM
It disables debugging and tracing in non-production environments, irrespective of the setting in web.config.

11/21/2011 9:21:47 PM
Yeah, I'm not sure I agree with quite a few of these "best practices" too... I mean, what he said about Server.Transfer is just wrong. Others seem to apply to only Web Forms (not MVC).