开发者

how to restrict the user without login

i created some pages in asp.net. but i want to 开发者_JS百科allow the users only if he is login. how to do that. is there any controls available for that one. Thank you


In the web.config there is a section below <system.web> where you can add:

<authorization>
    <deny users="?" />
</authorization>

It is normal that you put pages that requires login in a certain sub-directory and thus you can put a new web.config in that folder with the above lines inside <system.web>, this will prevent unauthorized access.

MSDN has a great section about Forms Authentication that I recommend you to read.


Yes, you need a login page that uses Forms Authentication.

See details here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜