Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6160693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:20:55+00:00 2026-05-23T21:20:55+00:00

This is more of a general question rather than a specific problem. I’m coding

  • 0

This is more of a general question rather than a specific problem.

I’m coding an asp.NET with C# Website with user login and admin controls etc and I obviously want the website to be as secure as possible because if someone accessed the admin side they could potentially drop all sql tables etc.

Therefore im asking for a bit of guidance in terms of how to make sure my website is secure. I’ve found a few posts on google and stuff but not really found anything worth reading. If anyone can redirect me to a decent post. Or just warn me of any measures I have not taken into consideration.

What I’ve done so far is:

When a user/admin enters their login details. It is authenticated using sql connections to retieve usernames and passwords from the database, if they exist, a session is created using the users uniqueID using Session[“_userID”] = id;

This is the ONLY place in the entire website where a session is created.

On ALL the pages that have any type of Restriction, On the page load, the first piece of code that runs checks if the Session[“_userID”] Exists. If it exists, it loads the page as usual, if not, it Purely redirects to the login page.

if (Session["_userID"] == null)
{
    Response.Redirect("login.aspx");
}
// rest of page loads

If not sure if this is easily hackable or even secure.

The only time a session id destroyed is when it either runs out, or the user logs out. using:

Session.Abandon();

these are pretty much the only security measures in place.

Is This Enough?

My Website Needs to be HACK PROOF

Thanks for reading!

Alex

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:20:56+00:00Added an answer on May 23, 2026 at 9:20 pm

    Firstly, make sure there is no ability whatsoever for anyone – website admin or not – to drop tables from your database via a web UI. Have a look at the section about “Applying the principle of least privilege” in here.

    Secondly, stop writing your own authentication and authorisation schemes, all the hard work has been done for you already and it’s just a few clicks away in the membership provider. This will do everything you’re asking for any many things you haven’t mentioned but probably should have such as proper salting and hashing of passwords. Have a look at “Using the ASP.NET membership provider” in this post.

    Finally, you’re not “hack proofing” your website, you’re simply increasing the level of difficulty to the point where it becomes highly unlikely. If you’re serious about security, I suggest reading through this series about The OWASP Top 10 for .NET developers. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is more an observation than a real question: MS-Access (and VBA in general)
This is more of an academic inquiry than a practical question. Are there any
Ok this is more of a computer science question, than a question based on
EDIT: This question is more about language engineering than C++ itself. I used C++
So this is more of a general question on the best practice of preventing
This question is closely related to this one but i think is more general.
This is more of an generic XML Schema question, but if and how do
This is more of a syntax question I'm trying to write a store procedure
This is more of a business-oriented programming question that I can't seem to figure
So this is IT more than programming but Google found nothing, and you guys

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.