How to check if a user has already been registered or not with a cookie?

I want to know how I can determine if a user has already been registered or not? using a cookie. I do not use any login. I have a db that checks id and PWD. Also pls tell me if this can be done without using cookies. Any code or links will help. web.config:

<authentication mode="Forms"> <forms name="myForm" loginUrl="LogIn.aspx" path="/" defaultUrl="Home.aspx"> </forms> </authentication> <authorization> <deny users="?"/> </authorization> 

thanks

+3
source share
2 answers

In asp.net using Windows / forms authentication, you can find out if the user is logged in with:

 <% Page.User.Identity.IsAuthenticated %> 

Form authentication is cookie based, but can be configured to not use cookies with cookieless settings.

How to fully customize forms authentication is not a quick answer, but it is relatively easy to configure that there are many HOW-TOs online. Here is a good http://www.4guysfromrolla.com/webtech/110701-1.shtml

MSDN: http://msdn.microsoft.com/en-us/library/aa480476.aspx

You can also use Windows authentication, which does not use cookies.

+10
source

I used:

 HttpContext.Current.Request.IsAuthenticated 
+3
source

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


All Articles