I want to make an administrator page for my website. It will be very simple - some fields that report various database statistics, and some tools to allow the administrator to rename certain categories in a simpler wa开发者_StackOverflow中文版y than writing out sql queries.
Obviously, this page needs to be secure. I want to keep it separate from the login system that regular users on the site use - it could just be a "enter username + password" prompt that appears when sometime tries to access the page.
What is a secure way to do this? Or is this even secure at all?
You need to configure your web-app through Form-based
authentication & authorization. You may define different roles
so you can grant
or deny
access to a given resource based on that roles in the Application.
Read these articles:
- Using Forms Authentication in ASP.NET
- How To Implement Forms-Based Authentication in Your ASP.NET Application by Using C#.NET
- Building Custom Providers for ASP.NET 2.0 Membership
- An Overview of Forms Authentication
you can have a separate folder admin with in the web contents and inside that you create this page. This has to be a username and password page for admin which can then navigate you to a page where you can do/decide what ever the admin wants to do.
精彩评论