197 ERR CTX NOT FOUND (Magic xpa 3.x)
Context not found.
A context ID sent by a rich client or a browser client does not exist in the Enterprise Server.
Whenever a client session starts, the Enterprise Server generates a unique context ID for that session. This context ID links subsequent requests from the client to the Enterprise Server.
The Enterprise Server keeps the context alive according to the value specified in the Context Inactivity Timeout environment setting (Magic.ini). This timeout value measures the time since the last request and times out the request if it is greater than this value.
Another environment setting that may influence the session between the browser client and the Enterprise Server is Post Context Unload Timeout (ContextUnloadTimeout).
The following are a number of scenarios and their solutions:
Scenario 1 (common to the rich client and browser client)
If the Runtime server serving a client was shut down, the client will receive error -197 upon the next access to the server.
Scenario 2 (specific to browser client)
During a Browser Client session, the end user had no interaction with the Enterprise Server for a period longer than the value set by the Context Inactivity Timeout environment setting.
Solution: Carefully increase this environment value. Setting a larger value means that the Enterprise Server maintains more open contexts for a longer time, which has a negative influence on available resources. Remember that the Context Inactivity Timeout environment setting is specified in tenths of seconds, and the default is 36000 or 1 hour.
Scenario 3 (specific to browser client)
A URL containing a context ID, such as saved as a bookmark, was accessed after the context expired.
Solution: The URL should access a program that starts a browser-based session; for example, appname=myapp&prgname=myprg.
Scenario 4 (specific to browser client)
While running a browser client session, the end user selected another URL, such as from a bookmark, and then, using the Internet Explorer’s Back functionality, tried to return to the Magic xpa browser session after the Post Context Unload Timeout had expired.
Solution: Carefully increase this environment value. Setting a larger value means that the Enterprise Server maintains more open contexts for a longer time, which has a negative influence on available resources.
Remember that the Post Context Unload Timeout environment setting is specified in tenths of seconds, and the default is 1200 or 2 minutes.
Remember that in development mode this timeout is limited to 1/10 of a second. As soon as a Browser program that has been started using F7 unloads, which means that the browser is closed or switched to another URL, the developer is toggled back to the Studio again.