How to configure user login in ASP.NET?

Asked By 0 points N/A Posted on -
qa-featured

I am creating a Web-based file maintenance system that runs on a local computer. This will just save all personal the details of a person. I have created a log-in form, wherein if an encoder logs in, he/she will not be able to modify the system settings while the admin user can do anything.

What I want is to disable administrative privileges for ordinary users. How can I do this? I’m using VB. Please help me with this one thanks.

SHARE
Best Answer by Jenny Ham
Best Answer
Best Answer
Answered By 0 points N/A #126138

How to configure user login in ASP.NET?

qa-featured

You can do this by accessing the ASP.Net configuration. Some users encounter an error while accessing the configuration. Just copy the whole folder of the project to the root of your Drive C:

1. Click the configuration settings found at the right side.

ASP.Net configuration

1. Click on the “Security” tab. Under “Roles” click “Create or Manage roles"

2. Under “Create New Role” on the “New role name” type in what kind of role a user could have. For example “Admin” role and click “Add Role” button. For other users, type for example “Basic”; this role will not have any admin privileges. Click OK and Click “Back” button.

Create New Role

4. Click “Create user” Fill out the required fields and select the appropriate role for the user.

Click “Admin” role for you want it to have admin privileges.
Click “Create User”. Create another account for the “Basic role”.
Click back when finished.

5. Select “Manage Users” if you want to manage created accounts. Close the browser.

6. Open the page where you want to restrict a certain user. Double click the aspx.vb where you will put the VB codes. Put this code on Page_Load

If (Roles.IsUserInRole("Basic") = False) Then

Server.Transfer("Access.aspx")

End If

The “Access.aspx” is the default page that will display when an authorized user tries to access admin privileges.

Answered By 0 points N/A #126139

How to configure user login in ASP.NET?

qa-featured

Hello Jannette,

ASP is an acronym for Active Server Pages which is a language of .net which is developed by Microsoft and this language is similar to C and also it is majorly used in many programs for smooth execution.

Coming in Windows Application Form in ASP it is simple and as it is drag and drop and no need to generate any code for that as automatic code will be generated.

Coming in IIS which can be said as an Internet Information Server first check this whether the installation is successful or not by accessing the localhost in any browser.

Configuring user login is very simple as select the form and design it in the way you need it and after all the design just set the buttons and then validations to validate user login.

Thank You.

Login/Register to Answer

Related Questions