Whenever I try to use Experience Editor towards my headless (dotnet) rendering host I get the following error:
Connection to your rendering host failed with a Not Found error. Ensure the POST endpoint at URL http://localhost:5268/jss-render has been enabled.
And this error in my Rendering Host console output:
> [15:06:53 ERR] The JSS_EDITING_SECRET environment variable is missing or invalid.
> [15:06:53 INF] HTTP POST /jss-render responded 400 in 7.7200 ms
I have the following setting in my Sitecore installation:
<setting name="JavaScriptServices.ViewEngine.Http.JssEditingSecret" value="SitecoreJssEditingSuperSecretValue" patch:source="Sitecore.JavaScriptServices.ViewEngine.Http.config"/>
and I have the following in my launchsettings.json
:
{
"profiles": {
"My.Project.Rendering": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7268;http://localhost:5268",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"JSS_EDITING_SECRET": "SitecoreJssEditingSuperSecretValue",
"SITECORE_JSS_EDITING_SECRET": "SitecoreJssEditingSuperSecretValue"
}
}
}
}
Which should ensure that the environment variable is set, and both Sitecore and my rendering host should be set up to use "SitecoreJssEditingSuperSecretValue" as the key, yet the error still appears in the rendering host and Experience Editor still fails.
This is a standalone 10.2 XP0 installation without Docker.
What am I missing here?