Ref: http://aspnet.4guysfromrolla.com/demos/printPage.aspx? Path =/articles/032807-1.aspx
IntroductionMost ASP. NET applications include a numberConfiguration Settings, Such as connection strings, mail server settings, system-wide default settings, and so forth. while these settings cocould be hard-coded in the sourc
I recently read some information about ASP. NET architecture settings. What I saw in the blog garden turned around when I thought it was good. 1. Understand the Web. config fileWeb. config is an XML text file used to store ASP. NET Web application configuration information (
iis7.0 set routing, URL steering, pseudo-staticConfigure the subdirectory Web. config to eliminate inheritanceInstead of modifying the Web. config file for the root directory, modify the subdirectory's Web. config. Assuming that t
. webconfigurationmanager. connectionstrings ["CNN"]. Connectionstring;This. Showmessage (CNN );} }
CNN. configConnectionstrings>AddName= "CNN"Connectionstring= "Cnnvalue"/>Connectionstrings>
Web. config XML version = "1.0" ?> Note: As an alternative to hand editing this file you can useWeb Admin Tool to configure settings for your application. UseThe w
The following is my learning experience in Asp.net. I have noted down my understanding of each knowledge point. please correct me if you have any errors!
ASP. NET configuration data is stored in XML text files. Each XML text file is named Web. config. The Web. config file can appear in ASP. NET.
In multiple directories
, while page checkcode. aspx allows access by all users, that is, authentication is not required.
2. Rewrite (not required) the web. config inheritance assume that there is Site A in IIS and there is a virtual directory B under Site A. You can enter "ttp: // ip address/"Access to site a, enter http: // ip address/B to Access Site B; and the web in Project B.
The easy-to-use sitefactory configuration file is complicated, which is a headache for many users who are not doing. NET web programming. The following describes the website Web. config content and how to modify it.
Configuration declaration Section This section defines that the name of the specific configuration node will be used in the
Aspnet_regiis-pe "connectionStrings"-app "/EnConfig/WebApplication1"
If you run the command directly, an error is reported. The error message is as follows:
Encrypting configuration section
A configuration file cannot be created for the requested Configuration object.
Failed!
How can this problem be solved? It's also very simple.
You only need to set the attributes of the E: \ Enconfig folder to web Sharing.
See the figure below: (figure 1)
In this c
ConfigSource Introduction 1:In web. config:
In the custom path \ xxx. config:
Note: The file path in configSouce can only be a relative physical path, that is, it can only be a backslash (\) and cannot be a slash (/).When the website is running, modifying the Web. Config f
The Web. config file is an XML text file used to store ASP. NET web applications.ProgramConfiguration information (for example, the most common setting of ASP. NET web application authentication method), it can appear in every directory of the application. After you create a web
Open an applicationProgramAfter the configuration file web. config, we will find the following section:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SessionstateMode= "Inproc" Stateconnectionstring= "TCPIP = FIG: 42424" Sqlconnectionstring= "Data Source = 127.0.0.1; trusted_connection = yes" Cookieless= "False" Timeout= "20"/>
This section descri
following is a brief introduction.Web. config is an XML document (now more and more popular with XML for configuration files). The root element is configuration and then contains a system. at the third level, the Web node sets various web pages for the site. there are a lot of labels that can be set in config, so we w
) When we get the pseudo-static rules, we need the rules under "IIS7 Web Server (Independent host user)";3. Configure the "Web. config" file1) If you have this file under the site, then add the rules in the "2) In this example, there is no "Web. config" file, to modify the s
[To] http://hi.baidu.com/jinzhu160/blog/item/24003b09eca730a52fddd4e8.html
I sorted it out. You can copy it to an XML file for ease of viewing.
Program. You can use the "website"> "ASP. NET configuration" option in Visual Studio.The complete list of settings and comments is in machine. config. Comments. This file is usually located in "Windows" Microsoft. NET "Framework" v2.x "
If flexible operations and read/write configuration files are required in. net1.1, a configuration file management class is encapsulated in the project for read/write operations. In. net2.0, The configurationmanager and webconfigurationmanager classes can be used to manage configuration files. The configurationmanager class is in system. configuration, and the webconfigurationmanager class is in system. Web. configuration. According to msdn
Program W
application (website ). Machine. config can be used for all site applications running on this application server. The configuration in Web. config can overwrite some existing default settings in machine. config. Here we often use web
connection string without decryption.The command for decryption is as follows: aspnet_regiis.exe-PDF "connectionstrings" "D: \ website2" note that a local key is used during encryption, this means that the decryption process must be completed on the same computer. If the encrypted Web. config file is moved to another computer, the connection string in the web.
Specifies the resource that requires specific configuration settings.
Configuration Structure example:
Path= "Path"AllowOverride = "True | false"/> Optional attributes
Attribute
Option
Description
Path
Resources that require specific configuration settings. If you useIf no path attribute is specified, the configuration
This element configures the level of code access security (CAS) applied to an application. If you want the web application to run inLowerThis element is used for full trust.
Syntax:
Attributes and elements
==================
Level: This attribute specifies the trust level in which the application runs. any trust level is mapped to a separate XML pllicy file through web. the trustlevel element in the
I use the web. config file by chapter asp. net3.5, some configuration Environments
These are case sensitive and start with lowercase letters.
First, let's talk about
The
The architecture of the
Below I will introduce several important parts of web. config.
1.
This element allows you to configure applicati
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.