A
A
alexanderbondarchuk2014-10-24 10:23:13
ASP.NET
alexanderbondarchuk, 2014-10-24 10:23:13

Authorization in ASP.NET, access to a protected area. How right?

Hello. New to ASP.NET.
I want to correctly implement access to the closed area of ​​the site. I ask you to suggest how it is conceptually correct to do this.
As I try now - there is a page with two controls on it. The second has visible=false. When the password is entered correctly, it changes to visible=true
Something tells me that this approach is wrong. In PHP, I made it easier - through the include of a page that is in an inaccessible directory from outside.
How to be in ASP.NET? It is possible, and even better, with an example consisting of separate pages and a way to close access to files in a directory (similar to .htaccess), and not controls.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Kulakov, 2014-10-24
@carbon88

There you need to put in the Web.config directory. Permissions and prohibitions are registered in this file.
Already on stackoverflow

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question