Both Web programs, Windows programs, Windows service programs, and configuration files are indispensable. We're all used to it. Place the connection string in the ConnectionString node and place the program's settings in the AppSetting node. The configuration file management program gives us a convenient way to manage, so how do we customize the configuration node?There are two ways, one, to inherit IConfig
The Web. config file usually includes settings that must be different based on the running environment of the application. For example, when deploying the Web. config file, you may have to change the database connection string or disable debugging. ASP. NET provides some too
Asp. NET provides a powerful Web. config to configure the site, in general, a Web site has only one root directory of the Web. config file, sometimes we want subdirectories with different permissions or parameter settings, you can
website to modify it!In ASP.. net, through the Web. config, you can use the
Web. the config file is a standard XML file. We can use it to set each web application under a machine, an application, or the Asp.net page under a directory. Of course, it can also be set for a
1. Understand the Web. config file
Web. config is an XML text file used to store ASP. NET Web application configuration information (for example, the most common settings ASP. NET Web a
1. Understand the Web. config file
The Web. config file is an XML text file used to store ASP. NET web applications.
Program Configuration information (for example, the most common setting of ASP. NET web application authenticati
affected by the settings in Web. config.E.g .:
Here we will discuss how to set up database connections in Web. config.
1. connect to a database:Add
Value = "uid = flash; Password = 3.1415926; database = News; server = (local)"/>
In the program, you can use the followingCodeTo use the
The Web. config file is an XML text file that is used to store configuration information for an ASP. NET Web application, such as the most commonly used settings for the authentication of an ASP. NET Web application, which can appear in every directory of the application. Wh
1. Understand the Web. config file
Web. config is an XML text file used to store ASP. NET Web application configuration information (for example, the most common settings ASP. NET Web a
Use an anonymous Internet User AccountIf you configure IIS to use anonymous authentication, you can use an anonymous Internet user account to access network resources. This can happen if any of the following conditions is true:
ApplicationProgramAnonymous access is supported.
The application uses form, passport, or custom identity authentication (in which IIS is configured as access using principal ). Use an anonymous account to access remote resources
1. Configure IIS to use anony
Web. config is an XML text file used to store ASP. net web application configuration information (for example, the most common settings ASP. net web application authentication method), which can appear in every directory of the application. After you create a
1. Summary
In most programsWeb. configAnd must be changed during deployment. It is tedious and error-prone to manual configuration changes every time. This section will tell you how to update automaticallyWeb. configFile to avoid these problems.2. Web. config Transformations and Web Deploy Parameters
There are two ways to automatically update the
1. Understand the Web. config fileThe Web. config file is an XML text file used to store ASP. NET web applications. Program Configuration information (for example, the most common setting of ASP. NET web application authentication
1. Understand the Web. config fileWeb. config is an XML text file used to store ASP. net web application configuration information (for example, the most common settings ASP. net web application authentication method), which can a
The Web. config file is an XML text file that is used to store configuration information for an ASP. NET Web application, such as the most commonly used settings for the authentication of an ASP. NET Web application, which can appear in every directory of the application. Wh
, namely the client and server side. The client is only responsible for saving the SessionID of the corresponding website, while the other session information is saved on the server side. In ASP, the SessionID of the client is actually stored in the form of a cookie. If a user chooses to disable cookies in the browser's settings, he or she will not be able to enjoy the convenience of the session or even have access to certain websites. In order to sol
If you are still confused about the web. config configuration file in Asp.net, please refer toArticleIt will give you a brief understanding of the Asp.net runtime mechanism.
This is often the case during development.ProgramFor the sake of confidentialitySource codeReleased along with the project, and the development environment and deployment environment may be different (for example, the database is diff
Understanding the Web. config file in C # in a detailedThe Web. config file is an XML text file that is used to store configuration information for an ASP. NET Web application, such as the most commonly used settings for the authe
1. First, you must reference two namespaces.
Code snippet
Using system. net. configuration;
Using system. Web. configuration;
PS: Are they not the same?
2. The following uses obtaining mailsettings as an example.
Code snippet
Test shows that the from value must be the username value plus the specified smpt server, and must be specified
For a local SMTP server, you only need to specify defaultcre
Web. configAn XML text file is used to store ASP. net web application configuration information (for example, the most common settings ASP. net web application authentication method), which can appear in every directory of the application. When you use VB. after creating a web
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.