Console
Console copied to clipboard
Executing Receive-RemoteItem (Remoting) cause an error in Sitecore 10.3
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)
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;