0
votes

I am new to ASP.Net and currently developing a small website in ASP.Net where I am supposed to create a page for uploading the items in a database. I can do that but I am facing a problem like I want that a person with a username and password stored in database be only able to access that page. I try to create a login page and after typing the username and password then only the person is able to go to uploaditems.aspx page. But if i type the url of that page in the address bar it does not redirect the user to the login page. Please tell me how to do that. Thank you

1

1 Answers

0
votes

you should configure your web config file like the code below

<system.web>
<authentication mode="Forms">
  <forms forms="Frmname" loginUrl="/login.aspx" />
</authentication>
</system.web>