Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
srinivas kante...
(67)
Alwyn
(63)
Abhisek Panda
(42)
Last 7 Days
Alwyn
(727)
nishithraj
(512)
Gaurav Arora
(503)
more...
Resources
»
Articles
»
ASP.NET/Web Applications
»
ASP.NET GUIDELINES TO IMPROVE PERFORMANCE AND SECURITY
Posted Date: 08 Oct 2009
Resource Type:
Articles
Category:
ASP.NET/Web Applications
Author:
Melchior
Member Level:
Gold
Rating:
Points
: 2
PERFORMANCE GUIDELINES
• Choose the collection type depends on the requirement
• Initialize collections to the right size when you can
• Manage the size of each object in collections
• Use arrays rather than collections
• Do not use exceptions to control application flow
• Use validation code to reduce unnecessary exceptions
• Use the finally block to ensure resources are released
• Replace ‘on error goto err’ with try/catch block
• Do not catch exceptions that you cannot handle
• Be aware that rethrowing is expensive
• Use tryparse method to avoid unnecessary exceptions
• Avoid repetitive field or property access
• Use of ‘+’ operator and stringbuilder
• Use compare method for case-insensitive string comparisons
SECURITY GUIDELINES
• Do not hard code connection strings
• Consider encrypting connection strings
• Do not log sensitive data
• Do not expose event log data to unauthorized users
• If you accept file names, validate them
• Limit file i/o operations using permissions
• Avoid hard coding your application's directory hierarchy
• Where possible, use securestring rather than system.string
• Validate sql input in sql commands
• Using parameters with stored procedures & dynamic sql
• Retrieve only the columns and rows you need
• Support paging over large result sets
• Use batch sql statements to reduce round trips
• Use primary keys and rows.find for indexed searching
• Use a dataview for repetitive non-primary key searches
• Open connections late and release them early
• Explicitly close connections
• Don’t open a connection during a single fill/update operation
• Pool connections
• Close datareader objects
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
ASP.NET - IMPROVE PERFORMANCE AND SECURITY
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Best way practice of Coding standards
Previous Resource:
Easiest way of understanding Base Classes And Inheritance
Return to Discussion Resource Index
Post New Resource
Category:
ASP.NET/Web Applications
Post resources and
earn money
!
More Resources
Best way practice of Coding standards
Setting Defaults Values for Rating Slider Control in AJAX
User Controls
Crystal Reports
Validate Name in ASP.net
Computer directory display using vb.net
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use