Closed gerardorm closed 3 years ago
Can you reproduce the issue locally with 6.2?
Can you reproduce the issue locally with 6.2?
I have not done it yet. I mean we prefer if we stay with 5.0, Is this something you think we should upgrade?
Did you remove any languages? What is unique about your client language?
No, we did not, we do have several languages but EN is the primary one. Seems like Context.ContentLanguage is null inside ExecuteCommand, which is weird.
Inside PSE I can call ContentLanguage.
I did an upgrade to 5.1 I got the same issue.
Maybe using LanguageManager.DefaultLanguage instead of Context.ContentLanguage ?
Hi, @michaellwest I found out that the root issue first of all, the IgnoreUrlPrefixes setting value contains the path for /sitecore modules/PowerShell so this was causing some inconsistencies when calling the ExecuteCommand so basically every path that you ignore prevent Sitecore from processing specific requests, causing ASP.NET to process the request without Sitecore. But after removing that I get 401 for each call to /sitecore%20modules/PowerShell/Services/PowerShellWebService.asmx
I think what you need is the patch for identity server. Are you using IS?
I believe a newer release like 5.1 came with the patch in the package.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:security="http://www.sitecore.net/xmlconfig/security/">
<sitecore role:require="Standalone or ContentManagement" security:require="Sitecore">
<pipelines>
<owin.cookieAuthentication.validateIdentity>
<processor type="Sitecore.Owin.Authentication.Pipelines.CookieAuthentication.ValidateIdentity.ValidateSiteNeutralPaths, Sitecore.Owin.Authentication">
<siteNeutralPaths hint="list">
<!-- This entry corrects the infinite loop of ExecuteCommand in the SPE Console -->
<path hint="spe">/sitecore%20modules/PowerShell</path>
</siteNeutralPaths>
</processor>
</owin.cookieAuthentication.validateIdentity>
</pipelines>
</sitecore>
</configuration>
Since I installed SPE I added the patch, no luck so far. Thanks for your time @michaellwest, sorry for bothering you.
Hey @gerardorm , not a bother at all. If you do update to 6.2 then it would be easier for me to provide you with dlls to debug the issue.
Hi @michaellwest, good news this morning I was able to get some luck, I added a patch for a site definition and added after 'modules_shell'. Patch: <site patch:after="*[@name='modules_shell']" name="modules_powershell" virtualFolder="/sitecore modules/PowerShell" physicalFolder="/sitecore modules/PowerShell" language="en" database="core" domain="sitecore" content="$(defaultContentDatabaseName)"/>
.
Thanks for the help, if you want to remove the ticket or maybe leave it so someone can based on this if they are having the same issues.
Regards.
What an interesting solution. How did you figure out to try that?
Using Sitecore PowerShell Extensions 5.0.0.42513 Sitecore 9.1 Windows PowerShell 5.1
Expected Behavior
Open the Immediate window without an error.
Actual Behavior
I get this error when open the Immediate Window while debuging.
Steps to Reproduce the Problem
Please include the version number of SPE and Sitecore.
[ ] Tested issue with clean install of Sitecore and the latest available version of SPE.
[ ] Asked questions on the Sitecore Slack Chat channel.
[ ] Reviewed questions and answers on the Sitecore Stack Exchange.