Several times of ArcGIS Server ADF timeout

Source: Internet
Author: User

I found that the following prompt is not satisfactory in English:
session has timed out from extended inactivity
a new session must be started to use this application by closing this Brower and reopening
I found it
arcGIS Server ADF timeout
there are three
■ one is the timeout of the ADF control, client-only timeout, and only related to the JSS of the ADF Control
that is, if your ADF control is not operated on the client for a certain time, other operations unrelated to the ADF control are not affected, and the JS and server communication without going through the ADF are not affected.
The result shows the content listed above. The timeout value is set in row 990th of aspnet_client \ ESRI \ webadf \ JavaScript \ display_common.js.
var maximumlapsetime = 10; // change this value to session timeout in minutes
the prompt message is also in this JS file. The showlapsealert () function is responsible for
the timeout value should be less than or equal to ASP. net itself, obviously, if it is greater than, the server has timed out, how can the client end be mixed.
If You Want To modify the timeout value, you only need to rewrite the two places, but you need to rewrite them again in the area after display_common.js is loaded, for example, after the tag
overwrites showlapsealert (), you will not be prompted for that bunch of birds.
if you want to disable this timeout,
var maximumlapsetime = infinity;

■ One is the timeout of ASP. NET itself, that is, the 20-minute session timeout of ASP that we normally access.
Add <sessionstate timeout = "10"/> in Web. config to modify
■ Data source timeout, server-only
When using non-pooled settings in ArcGIS Server settings, an Asp.net session will create a server context when the ArcGIS Server is created. This timeout is the life of the server context, the data source timeout should be the same as the Asp.net session; otherwise, the server context may die during a session and must be re-created.
How to modify it? I don't know. It's set on the map server.
Timeout in non-pooled mode .. I don't understand either.
The original English version is as follows:
Bytes ------------------------------------------------------------------------------------------------------------------
Timeout settings in the Web ADF

There are three timeouts to consider when using a Web ADF application: Web ADF timeout (client-tier), Asp. net Session Timeout (Web-tier), data source timeout (server-tier ). the relationships between the different timeout values and where they apply is important to understand.

the Web ADF timeout is only used by the browser. the ASP. net session is not aware of the client timeout, however both the client and web-tier timeouts are designed to work together. the Web ADF timeout gives you the ability to use browser logic to provide the end-user with information about timeout details, without requiring an additional request to the web server. this is important in an asynchronous communication environment (such as Ajax-enabled web ADF controls) where you want to intercept a callback to a web application session that no longer exists. in general, the Web ADF timeout is designed for the end user while the ASP. net session timeout is necessary from a Web application perspective to dispose of resources. with this in mind, the Web ADF timeout can be the same or less than the ASP. net Session Timeout. in most cases, they shoshould be the same.

the data source timeout is usually necessary to control erroneous requests to services to make sure system resources are available and utilized appropriately. timeout values are relative and depend on service requirements. since most requests to services in the Web ADF are stateless, Asp. net Session Timeout does not play a part. however, if a connection to a service is persistent guest SS requests, the relationship between ASP. net session timeouts and Data Source timeouts may need to be considered. in the case of ArcGIS Server local connections to non-pooled services, server context can be created once at the beginning of a session and maintained (persisted) for the duration of the session. if the "maximum use" timeout on the ArcGIS Server service is less than the Session Timeout, it is possible that server context will need to be recreated.

1) The web ADF timeout is set in the display_common.js file on the following line:
VaR maximumlapsetime = 10;

The timeout value is in minutes. note that by default, the display_common.js file is embedded as a Web Resource in Web ADF controls and streamed to a browser at runtime. the default value is set to 10 minutes. in order to change this value for a Web ADF application, you need to change the maximumlapsetime variable after the display_common.js file is loaded. in the web page Add the following script tag and variable setting in the form that contains web ADF controls:
<Script language = "JavaScript" type = "text/JavaScript">
VaR maximumlapsetime = 20;
</SCRIPT>

At runtime, The display_common.js content will be loaded inline at the beginning of the form. adding this script tag will override the maximumlapsetime variable setting in display_common.js. to disable the Web ADF timeout, set the maximumlapsetime variable to infinity:

<Script language = "JavaScript" type = "text/JavaScript">
VaR maximumlapsetime = infinity;
</SCRIPT>

To change the message returned after the timeout is reached "Override" The showlapsealert () JavaScript function. "Override" in this sense means define the showlapsealert () JavaScript function after the function in display_common.js. for example, include this at the end of the ASPX page:

<Script language = "JavaScript" type = "text/JavaScript">
Function showlapsealert ()
{
Alert ("application has timed out. Reloading .");
Window. Location. Reload ();
}
</SCRIPT>

Note that this also triggers a page reload via JavaScript.

2) the ASP. net Session Timeout can be set in the web. config file. by default, it is set to 20 minutes. to change the timeout for a web application, add the following to your web. config, within <system. web>:

<Sessionstate timeout = "10"/>

3) a data source timeout is managed by the data source provider. for example, ArcIMS Administrators have the ability to change the time alloted for a spatial server to process a request. arcGIS Server administrators can change the usage time alloted for an individual service. administration documentation for specific data sources may provide additional details on timeout management at this level.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.