ASP.NET Webforms Authorization

Hướng dẫn dưới đây giúp thiết lập cấu hình AUTHENTICATION và AUTHORIZARION trong ASP.NET WebForms 4.5

Cấu hình file web.config trong thư mục gốc của ứng dụng

<location path=”Account”>
<system.web>
<authorization>
<allow users=”*”/>
</authorization>
</system.web>
</location>

<system.web>
<authentication mode=”Forms”>
<forms name=”ASPNETAUTH” loginUrl=”~/Account/Login”></forms>
</authentication>

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

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s