Introduction to the ASP. NET Web Site Administration Tool

Source: Internet
Author: User

Do you feel bored with the operation of Web. config?

It's really troublesome to always manually edit Web. config.

However, since ASP. NET 2.0, there is an ASP.

This tool, in fact, is a GUI that operates web. config,

Some of the settings you have in this ASP. NET Site Administration Tool

Will basically be reflected in the Web. config,

So here we go along the way,

First, you want to set up Web. config that's for a project,

So you also have to bring up ASP. NET Site Administration tools for a project,

In fact, you just need to open the solution where your site is located,

Then open the ASP. NET Site Administration tool on the solution, OK,

Then click on the fluorescence section above to bring up the ASP.

Based on this, you can see that the ASP. NET Web Site Administration tool is divided into three blocks,

Security, applications, providers,

Here are the three pieces of the introduction,

First of all, look safe.

There are three of users, roles, and access rules in security,

Let's look at the user block first,

User block is the provision of user registration and management,

To enable users, you must first change the validation type to the Forms type.

In the default settings for the project's web. config, the authentication type is the Windows type,

To not have the user function, we first enable the forms type,

Click "Select Authentication Type" to enter

Forms authentication mode, which is represented by the Internet

While the local network represents the Windows authentication mode

Note the changes to Web. config and the enabled Web. config before you enable the Forms type.

Before enabling

When enabled

You can create a user after you enable the Forms authentication mode.

Note: If the "security" function cannot be used to create a user, role, please refer to: http://www.cnblogs.com/tianguook/p/4011420.html

When creating a user, be careful to remember all e-mails and passwords,

Do not enter the mess, because the email message is when you use the Forgot password function,

The destination address of the message to be sent, if it is wrong, then you will not receive the mail,

Note: The minimum password length is 7 and contains a special character, for example: @$ #什么的

The Create user function in the user block is as shown above,

But where are the users you created stored?

Oh, don't worry, look at my last blog post, I registered a database,

And it automatically creates 11 data tables into my database when you register,

The functions of those databases are going to play out here,

The information you create for this user is stored in those 11 tables.

[Aspnet_users] and [aspnet_membership] data tables

And note that passwords are stored after encryption, not in clear text.

The above is a description of the user function,

And then it's defining the role function,

The role feature is set to not enabled by default in Web. config.

So to enable it first,

The Enable roles feature adds the following statement in Web. config

Once you enable the role feature, you can create a role,

I'll start by creating a role for Admin,

and add the user I just added to this role,

Role function is that when you have a lot of users on your website,

You can divide these users into many classes by role, each of which belongs to some role,

This way you can affect all the users under the role by manipulating the role.

Without having to operate on a single user,

This means that roles are used to manage users uniformly.

Then it means access to the rules,

Access rules are in the directory, that is, you can create access rules for only one directory.

A role or user can either access the directory, or it cannot access the directory,

Instead of a user being unable to access a file, be aware that you can only work in a directory.

The method of operation is very simple, you can try to know,

And then we're talking about the other piece.----Application,

These include application settings, SMTP settings, application state, debugging and tracing,

First look at the application settings,

For application settings white point,

I think you've all used the AppSettings section.

Some also put the database connection string in this appSettings,

And this application is set up to operate the AppSettings section,

The settings that are made in this application setting are fed back to the AppSettings section in the Web. config.

For example, I create the following application settings:

Look again at the appSettings section of Web. config

Oh, this is understood, understand it is not much to say,

Then look at the SMTP settings,

In fact, the SMTP setting is used when the user needs to retrieve the password,

The mail server that is used to send mail to the user's mailbox,

Its modifications will also correspond to some of the configurations in the System.Net section of the Web. config

Look at Web. config again,

That makes sense, right?

The next step is to look at the application state,

As the name implies, also do not introduce more, just to introduce a method,

If your application goes offline, you do not want the project to have a default error page.

You can add a app_offline.htm to the project,

Then, after going offline, the project will automatically jump to this app_offline.htm page,

In tracking and debugging blocks,

The main introduction is to define the default error page

As the name implies, the page that jumps to when your project goes wrong

And then we look at the last piece of the provider,

In the provider this piece,

In fact, there is no good focus on the introduction, we carefully point together OK,

The above is an introduction to the ASP. NET Web Site Administration Tool,

What you should be aware of is the operations of the ASP.

will be reflected in your registered database and Web. config,

You don't have to be overly complicated,

It's just a GUI for manipulating databases and Web. config.

Introduction to the ASP. NET Web Site Administration Tool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.