In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to configure ASP.NET steps, the content is very detailed, interested friends can refer to, hope to be helpful to you.
The Web.config file is an XML text file that stores configuration information for ASP.NET Web applications (such as the most common way to configure authentication for ASP.NET Web applications) and can appear in every directory of the application. When you create a new Web application through VB.NET, a default Web.config file is automatically created in the root directory by default, including the default configuration settings, and all subdirectories inherit its configuration settings.
If you want to modify the configuration settings of the subdirectory, you can create a new Web.config file in that subdirectory. It can provide configuration information in addition to the configuration information inherited from the parent directory, or it can override or modify settings defined in the parent directory.
Changes to the Web.config file at run time do not need to restart the service to take effect (note: < processModel > section exception). Of course, Web.config files can be extended. You can customize the new configuration parameters and write configuration section handlers to handle them.
The web.config configuration file (the default configuration setting) all of the following code should be located in
< configuration >
< system.web >
And
< / system.web >
< / configuration >
The following example omits this XML tag for learning purposes
1. < authentication > section
Function: configure ASP.NET authentication support (for Windows, Forms, PassPort, None). This element can only be declared at the computer, site, or application level. The < authentication > element must be used with the < authorization > section.
Example:
The following example configures the site for form-based (Forms) authentication. When a user who does not log in visits a page that requires authentication, the page automatically jumps to the landing page.
< authentication mode= "Forms" > < forms loginUrl= "logon.aspx" name= ".FormsAuthCookie" / > < / authentication >
The element loginUrl represents the name of the landing page, and name represents the name of the Cookie.
2. < authorization > section
Purpose: to control client access to URL resources (such as allowing anonymous users to access). This element can be declared at any level (computer, site, application, subdirectory, or page). Must be used in conjunction with < authentication > section.
Example: the following example disables access to anonymous users
< authorization > < deny users= "?" / > < / authorization >
Note: you can use user.identity.name to get the current user name that has been authenticated; you can use the
The web.Security.FormsAuthentication.RedirectFromLoginPage method redirects the authenticated user to the page that the user has just requested. For specific examples, please refer to Forms Verification http://www.fanvb.net/websample/dataauth.aspx
3. < compilation > section
Purpose: configure all compilation settings used by ASP.NET. The default debug property is "True". After the program has been compiled and delivered, it should be set to True (as detailed in the Web.config file, examples are omitted here)
On the configuration of ASP.NET steps is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.