Describes the following aspects: installation of the required hardware and software conditions. Configure Config.web (configuration file and the meaning of each configuration)
The operation of ASP needs an environment, can be PWS, can also be iis,asp. NET needs is NGWS (installer download)
This is the download provided by Microsoft. The file is about 80 trillion, do not want to waste time, you can go to the "Software" magazine in the first phase of the CD-ROM, which contains this document.
You need to look at your machine before you install it:
Hardware requirements (minimum) is: Pii300,ram 96M (i installed on 64M, successful, but relatively slow)
Software Requirements: window2000,ie5.5, perhaps also to make a patch.
After the installation is complete, first look at the configuration issue. Asp. NET is configured with XML-formatted file Config.web, (somewhat like php.ini in PHP), the difference is that this is a hierarchical configuration structure, that is, in each directory can have a config.web file, in the inheritance of all the configuration of the superior directory, it can give the level of the directory to provide a Configurations for special needs. This structure will bring you some convenience:
The configuration information is stored in the XML configuration file. Administrators are easy to update configuration settings, while developers are easy to understand configuration content.
. The configuration system is easy to extend. You can store your own configuration criteria and settings in the configuration system.
Changes to the asp+ configuration file are automatically detected by the system. The system administrator does not need to reboot the system for the change to take effect.
. A hierarchical configuration that enables different parts of different applications or individual applications to be set differently.
The following examples are provided in MSDN:
The following are the referenced contents: <!--CONFIG. WEB FILE--> <configuration> <configsections> <add names= "httpmodules" type= "System.Web.Config.HttpModulesConfigHandler"/> <add names= "httphandlers" type= "System.Web.Config.HttpHandlerConfigHandler"/> <add names= "sessionstate" type= "System.Web.Config.SessionStateConfigHandler"/> <add names= "Globalization" type= "System.Web.Config.GlobalizationConfigHandler"/> <!--ADDITIONAL configsection DECLARATIONS Go--> </configsections> <!--http Module subelements go--> <!--http handlers subelements go--> <sessionstate> <!--session state subelements Go--> </sessionstate> <globalization> <!--session state subelements Go--> </globalization> <!--ADDITIONAL CONFIG SECTIONS Go--> </configuration>
|
All configuration information must reside between the <configuration> and </configuration> tags. The configuration file has two main sections:
The handler declaration for the Configuration section section (included in the <configsectionS> and </configsectionS> tags).
Second, the actual configuration section (in order to be clear, their child elements have been removed). Note that each of the following configuration subsections must exist for a declaration that should have a <configsections>. Each declaration gives the configuration section name and indicates the NGWS Framework assembly and class that will process its configuration information. Each configuration section contains the contents of the asp.net detail configuration setting.
If you already have NGWS installed, you can search the Windows directory for config.web files, which is a system-level configuration file. You can browse its settings for reference.
Here are a few examples through which you can learn about the use of several more important settings:
First, <compilation debugmode= "true"/>
Here, debug mode is turned on (set to true). Set to True to debug errors in your code using the Debug tool for the MS FRAMEWORK SDK
Second, <globalization requestencoding= "Us-ascii" responseencoding= "Iso-8859-1"/>
In the globalization section, the encoding of the request and response (Response) is set.
Note here that the response encoding is "iso-8859-1, which is not able to display Chinese, change it to GB2312 to display Chinese."
Third, <assemblies>
<add assembly= "System.Data.dll"/>
</assemblies>
In the Assemblies section, a Assemblie was added. This setting allows you to refer to the class library in the program in the form of <%@ import namespace= "System.Data"%>.
In the Security section, you can set the way the site is validated.
The following are the referenced contents: <security> <authentication mode= "Windows"/> </security> |
This sets the authentication mode to windows-based authentication, which is the original HTTP authentication. If mode is set to a cookie, the authentication method is form-based. You can also set up mode= "Passport" (Passport authentication), which requires the Passport SDK to be installed. Specific validation instances, and code can be found in the Security section of the http://www.gotdotnet.com/quickstart/aspplus/.
V. DNS settings
The following are the referenced contents: <appsettings> <add key= "myconn" value= "Server=localhost;uid=sa;pwd=mypassword; Database=somedatabase "/> </appsettings> |
A connection string "MyConn" is defined here for invocation. The specific use will be described in the following examples.