Answered by:
ASP.NET Website security

Question
-
I create a web application using asp.net via vb.net.
how where if the user closes the application without logging out?
what are the key points for security asp.net website?- Moved by Jack Zhai-MSFTMicrosoft contingent staff Wednesday, August 7, 2013 1:36 AM Not VS General issue.
Monday, July 29, 2013 7:03 AM
Answers
-
there are a lot of things to discuss when it comes to security ,here are few tips :
1. use parameterized query,stored procedures when accessing db -- avoid sql injection.
2. be carefull when displaying error messages this may give information about your application's internal implementations.
3.always send data via post method only use get method only to retrieve pages.
4. if your application has upload facility ex:image upload -- check for content type and file size being uploaded
thus avoiding denial of service attacks.
5.encrypt sensitive information like connection string in web.config file.
6. encrypt and store informations like passwords in db.use hashing if you do not need to decrypt else encrypt it with a key and store.
7. use parameterized queries ,sp_executesql when constructing dynamic queries in stored procedures.parameterized queries does type checking and sanitizes queries from sql keywords thus preventing sql injection.
8.set validaterequest = true to avoid cross site scripting attack.
have a look at these links : web security,encrypt connection string ,encryption .net,request validation
- Edited by Sridhar Rajan Venkataramani Monday, July 29, 2013 7:29 AM typograhical error
- Proposed as answer by Sridhar Rajan Venkataramani Monday, July 29, 2013 7:44 AM
- Marked as answer by Just Karl Friday, September 27, 2013 3:59 PM
Monday, July 29, 2013 7:26 AM -
Hi,
You could post this issue in http://forums.asp.net where asp.net experts live in, and there you would get dedicated support. Thanks for your understanding.
Best regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Wednesday, August 7, 2013 1:36 AM
All replies
-
there are a lot of things to discuss when it comes to security ,here are few tips :
1. use parameterized query,stored procedures when accessing db -- avoid sql injection.
2. be carefull when displaying error messages this may give information about your application's internal implementations.
3.always send data via post method only use get method only to retrieve pages.
4. if your application has upload facility ex:image upload -- check for content type and file size being uploaded
thus avoiding denial of service attacks.
5.encrypt sensitive information like connection string in web.config file.
6. encrypt and store informations like passwords in db.use hashing if you do not need to decrypt else encrypt it with a key and store.
7. use parameterized queries ,sp_executesql when constructing dynamic queries in stored procedures.parameterized queries does type checking and sanitizes queries from sql keywords thus preventing sql injection.
8.set validaterequest = true to avoid cross site scripting attack.
have a look at these links : web security,encrypt connection string ,encryption .net,request validation
- Edited by Sridhar Rajan Venkataramani Monday, July 29, 2013 7:29 AM typograhical error
- Proposed as answer by Sridhar Rajan Venkataramani Monday, July 29, 2013 7:44 AM
- Marked as answer by Just Karl Friday, September 27, 2013 3:59 PM
Monday, July 29, 2013 7:26 AM -
Hi,
You could post this issue in http://forums.asp.net where asp.net experts live in, and there you would get dedicated support. Thanks for your understanding.
Best regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Wednesday, August 7, 2013 1:36 AM