The httpRuntime element
configures ASP.NET HTTP run-time settings that determine how a request for an
ASP.NET application is processed and ASP.NET creates application domain for
each web application that will run on a web server.
When a
request comes in, ASP.NET loads the HTTP Runtime settings into process and
create HTTPRuntime Object which is used to begin ASP.NET Pipeline model that
process the web request and the ProcessRequest() method
of HTTP Runtime starts the ASP.NET Page life cycle processing.
Here are few HTTPRuntime
settings, which can be configured in web.config file
xml version="1.0"?>
<configuration>
<system.web>
<httpRuntime executionTimeout="300" maxRequestLength="51200" targetFramework="4.6.1" maxQueryStringLength="2048" maxUrlLength="4096" />
</system.web>
</configuration>
executionTimeout:
The executionTimeout property
indicates the maximum number of seconds a request is allowed
to execute before being automatically shut down by ASP.NET. The
default is 110 seconds
<system.web>
<httpRuntime executionTimeout="300"/>
</system.web>
maxRequestLength:
The
property maxRequestLength indicates
the maximum file upload size supported by ASP.NET. This limit can be used to
prevent denial of service attacks caused by users posting large files to the
server. The size specified is in kilobytes. The default is 4096 KB (4 MB)
<system.web>
<httpRuntime maxRequestLength="51200"/>
</system.web>
targetFramework:
The
property targetFramework indicates the version of the .NET Framework that
the current web application targets
<system.web>
<httpRuntime targetFramework="4.6.1"/>
</system.web>
maxUrlLength:
The
property maxUrlLength indicates
the maximum length of the URL supported by ASP.NET, in bytes. The default value
is 4096.
<system.web>
<httpRuntime maxUrlLength="4096" />
</system.web>
maxQueryStringLength :
The
property maxQueryStringLength indicates the maximum length of the query
string supported by ASP.NET, in bytes. The default value is 2048.
<system.web>
<httpRuntime maxQueryStringLength="2048" />
</system.web>
No comments:
Post a Comment