Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing Receive-RemoteItem (Remoting) cause an error in Sitecore 10.3 #1322

Open
fpodshivadlov opened this issue Feb 21, 2024 · 1 comment

Comments

@fpodshivadlov
Copy link

Context

Versions:

  • Sitecore 10.3
  • SPE 6.4

The issue is like in #1274 / #1275, but with src/Spe/sitecore modules/PowerShell/Services/RemoteScriptCall.ashx.cs file.

Expected Behavior

The executing of the Receive-RemoteItem command for Sitecore 10.3 works fine.

Actual Behavior

Executing the Receive-RemoteItem command I have the following error on the Local Powershell:

Receive-RemoteItem: C:\Data\AMLG-DEP1\temp\Test-SpeRemoting.ps1:25:1
Line |
25 | Receive-RemoteItem -Session $session -Path $returnValue -RootPath Ser …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Download failed. Internal Server Error

And the following error in Sitecore logs:

8956 12:31:50 ERROR Application error.
Exception: System.MissingMethodException
Message: Method not found: 'System.String Sitecore.Configuration.Settings.get_IndexFolder()'.
Source: Spe
at Spe.sitecore_modules.PowerShell.Services.RemoteScriptCall.GetPathFromParameters(String originParam, String pathParam)
at Spe.sitecore_modules.PowerShell.Services.RemoteScriptCall.ProcessFileDownload(HttpContext context, String originParam, String pathParam)
at Spe.sitecore_modules.PowerShell.Services.RemoteScriptCall.ProcessFile(HttpContext context, Boolean isUpload, String originParam, String pathParam)
at Spe.sitecore_modules.PowerShell.Services.RemoteScriptCall.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
@fpodshivadlov
Copy link
Author

Tested Receive-RemoteItem -Session $session -Path "$name" -RootPath Package -Destination "." (Sitecore 10.3) after the change:

File src/Spe/sitecore modules/PowerShell/Services/RemoteScriptCall.ashx.cs:
From

  case "index":
      folder = Settings.IndexFolder;
      break;

to

  case "index":
      folder = FileUtil.MakePath(Settings.DataFolder, "/indexes");
      break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant