Program configuration in Community

xiaoxiao2021-03-06  109

The program uses multiple configuration files, and nowadays, a few elements

1 .1 Elements

Identify configuration settings specific to page

ValidateRequest: Indicates that ASP.NET checks if there is potential dangerous data in all content entered from the browser. If you are true, all input data is compared to a list of potential hazard values, thereby performing request verification. If a match occurs, ASP.NET will trigger HttpRequestValidationException exception.

1 .2 element

>

/ httpmodules>

Configure the HTTP module within an application.

Httpmodule: httpmodule is an assembly that implements the IHTTPMODULE interface and handling events. The ASP.NET contains a group of HTTPModule modules that can be used by the application. For example, ASP.NET provides sessionStateModule to provide session status services to your application. You can create custom HTTPMODULE to respond to ASP.NET events or user events.

The general process of writing HTTPModule is:

Implement the IHTTPModule interface.

Handling the init method and register for the required events.

Handling this event.

If you must clean up, you can also implement the Dispose method as needed.

Register this module in Web.config.

Submark Description Add the HTTPModule class to the application. Note that if the same predicate / path combination has been specified (eg, in a web.config file in the parent directory), the second call to will override the previous settings.

Property Description Name provides a good name for the module. This allows you to associate an event handler for module events within the global.asax file. TYPE specifies a comma-separated class / assembly combination consisting of versions, assemblies, and public key tags. ASP.NET first searches for assembly DLL in the application's dedicated / bin directory, then search the assembly DLL in the System Program Cache.

removes the HttpModule class from the application. Removes all HttpModule mappings from the application.

1 .3 element

Configure the ASP.NET HTTP Runtime setting. This section can be declared at your computer, site, application, and subdirectories.

Property Description MaxRequestLength Indicates the maximum file upload size supported by ASP.NET. This limitation can be used to prevent denial of service attacks caused by users from passing a large number of files to the server. The specified size is in KB. The default is 4096 KB (4 MB). 1 .4 element

Based on the URL and HTTP predicates specified in the request, the incoming request is mapped to the appropriate IHTTPHANDLER or the IHTTPHANDLERFAACTORY class.

Submark Description Specifies the predicate / path mapped to the IHTTPHANDAL or IHTTPHANDLERFACTORY class.

Property Description The VERB predicate list can be a comma-separated HTTP predicate list (such as "GET, PUT, POST"), or it can be a start script map (such as wildcard * [asterisk]). The Path path property can contain a single URL path or a simple wildcard string (for example, * .aspx). TYPE Specifies a comma-separated class / assembly combination. ASP.NET first searches for assembly DLL in the application's dedicated / bin directory, then search the assembly DLL in the System Program Cache.

Remove the predicate / path mapped to the IHTTPHANDLER class. The instruction must be accurately matched with the predicate / path combination of the previous instruction. This instruction does not support wildcard. Removes all IHTTPHANDLER mappings that are currently configured or by specifying web.config files.

1 .5 Elements

Control the settings of XML Web Services created using ASP.NET. - | - - | - elements

转载请注明原文地址:https://www.9cbs.com/read-126316.html

New Post(0)