SaveDataAsFile Method


Context.Session.SaveDataAsFile as L (FileName as C, Value as C [, RemoveAfterFirstRetrieval as L])

Context.Session.SaveDataAsFile as L (FileName as C, Value as B [, RemoveAfterFirstRetrieval as L])



The name to be associated with the contents being saved.


The blob to be saved.


The characters to be saved. The characters are converted to a UTF-8 stream of bytes that are saved.


Default value is .t.. This option can only be used when session storage is not in use on the classic application server.


Saves the value to the current session as a file identified by FileName.


Context.Session.SaveDataAsFile() saves the value to the current session. The specific behavior will depend on the server and settings.

If session storage is enabled, the data is written to a storage object separate from the session state variables.

Alpha Anywhere Application Server for IIS defaults to writing all contents to the session state. Using session storage greatly improves the performance of IIS based servers because the file contents are only retrieved for a session when requested.

Alpha Cloud always uses session storage and writes these contents to Amazon S3 storage managed by Alpha Cloud.

Alpha Anywhere Application server (classic edition) defaults to writing files to the session folder, but fully supports session storage.

Check Context.Session.CallResult.Success before using the return value.

See Also