ASP.NET Web Forms "Individual Accounts" not redirecting to login page for not logged in users

hidden82

I looked everywhere for my specific situation and I can't find it anywhere.

I am new to ASP.NET and I recently created an ASP.NET Web Forms project with Individual Accounts ENABLED.

I know that if this option is selected it uses ASP.Net Identity but I cant find anywhere on how to make it so only logged in accounts can access the website specifically with Web Forms Selected when the project is created.

I just want it so not logged in accounts are redirected back to the log-in page.

I don't know where else to go and if any of you guys can help a newbie like me I would be grateful. Thanks!

manolo386

Ok, here is some example.

In your project you have one file with the name web.config.

Add in inside in the section <system.web> --> authentication and authorization

enter image description here

This is a usefull link that you could need:https://www.c-sharpcorner.com/UploadFile/fa9d0d/forms-authentication-in-Asp-Net/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

ASP.NET Forms Authentication - not redirecting to any page

Asp.Net Web api: view all logged in users

Redirecting to another web page instead of default Url in ASP.NET

Redirecting logged in and non logged in users

Asp.net core Identity successful login redirecting back to login page

Asp.net Identity keeps redirecting back to login page after successfull login

Web api not redirecting to identity server login page

ASP.NET Web Forms problems with a login modal

ASP.net Web Forms Application login using external DB

Blazor WebAssembly App with Individual Accounts and ASP.NET Core Hosted - Token request - "error": "unauthorized_client"

integrate azure AD authentication with asp.net core identity individual accounts

Redirecting user to default page after login in ASP.NET Core using Okta

Redirecting to Login Page Automatically without doing Action in Controller ASP.NET MVC when session expired

laravel redirecting users who are not logged in

WordPress - Redirect logged in users from login page to custom page

Whitelisting ip addresses and redirecting users on WordPress login page

How to handle two different forms in an asp.net web page?

ASP.NET Web Forms access control on page from JavaScript

prevent the logged in uuser from accesing the login page asp.net mvc applicaion

Block login page for logged in users on Symfony3

How to redirect to Login page when users not logged in the application

How I can disable login page for users who logged in already

OpenCart not redirecting to login page

Redirecting from /login to / for authenticated users

ASP.NET web.config Forms Authentication, deny anonymous users, allow anonymous access for single files

Create Login and Validating Users in Asp.net

Login page is not redirecting to another page

ASP.NET Core 2.0 - users are logged out within an hour

ASP.NET MVC create "Add to favorite" button for logged in users