Login to .NET.

Hi, I was wondering what is the best way to get the user to log in when they come to the site in .net. I set up the membership functions, and I was wondering what is the best way to ensure that no matter what address it comes to, they must first authenticate before accessing the requested page. Any resources will be great, thanks.

+2
source share
2 answers

Change Web.configin the root of the application to read:

<authentication mode="forms">
   <forms loginUrl="Login.aspx" defaultUrl="/" />
</authentication>
<authorization>
   <deny users="?" />
   <allow users="*" />
</authorization>

. , ASP.NET , ASP.NET. IIS. ASP.NET ISAPI DLL IIS.

: ASP.NET.

+13

web.config

<forms loginUrl="Login.aspx"
       protection="All"
       timeout="30"
       name=".ASPXAUTH" 
       path="/"
       requireSSL="false"
       slidingExpiration="true"
       defaultUrl="default.aspx"
       cookieless="UseDeviceProfile"
       enableCrossAppRedirects="false" />
+4

Source: https://habr.com/ru/post/1706519/


All Articles