0

I am running a script and I am using loop concept to get certain data. But a session timeout error was encountered during the script execution and the script stopped running.

Issue: A script needs to be executed in the session before the variable value can be inspected.

I am new to using PowerShell script and have no idea how to resolve this kind of error.

Here, I have attached a demo script and error.

enter image description here enter image description here enter image description here

Thanks in Advance. Manish

4
  • Can you share the screenshot of error? Jul 25 at 12:19
  • I have attached screenshot in description with session tooltip error. Script randomly stopped running after 25000. Jul 25 at 12:36
  • and what is your Sitecore version? Jul 25 at 12:49
  • It's a Sitecore 8.2 (rev. 180406) Jul 25 at 13:19

1 Answer 1

0

This issue typically happens when the session object cached on the server in memory is lost. Most often this happens after the script completes or the application pool in IIS recycles.

You may want to design your script to support restarting from the last completed step. For example you could update an item or write progress to a database table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.