6

I have installed new Sitecore 10 instance without any trouble using SIA. When I tried to open sitecore interface via appending /sitecore to URL, I received this error when redirected to Identity Server to authenticate:

Main part of error is this:

 Unrecognized SameSiteMode value -1

Full error log from Sitecore Identity Server:

2020-08-04T16:58:27.2915125+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executed action method "Sitecore.Plugin.IdentityServer.Controllers.AccountController.Login (Sitecore.Plugin.IdentityServer)", returned result "Microsoft.AspNetCore.Mvc.ViewResult" in 45.0196ms.
2020-08-04T16:58:30.8918604+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executing ViewResult, running view "Login".
2020-08-04T16:58:31.5786153+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executed action "Sitecore.Plugin.IdentityServer.Controllers.AccountController.Login (Sitecore.Plugin.IdentityServer)" in 4410.1661ms
2020-08-04T16:58:31.5805941+02:00 [ERR] (Sitecore Identity/WIN-G4E0D3RI00V) An unhandled exception has occurred while executing the request.
System.InvalidOperationException: Unrecognized SameSiteMode value -1
at Microsoft.AspNetCore.CookiePolicy.ResponseCookiesWrapper.ApplyPolicy(String key, CookieOptions options)
at Microsoft.AspNetCore.CookiePolicy.ResponseCookiesWrapper.ApplyAppendPolicy(String& key, String& value, CookieOptions options)
at Microsoft.AspNetCore.CookiePolicy.ResponseCookiesWrapper.Append(String key, String value, CookieOptions options)
at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenStore.SaveCookieToken(HttpContext httpContext, String token)
at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.SaveCookieTokenAndHeader(HttpContext httpContext, String cookieToken)
at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.GetAndStoreTokens(HttpContext httpContext)
at Microsoft.AspNetCore.Mvc.ViewFeatures.AntiforgeryExtensions.GetHtml(IAntiforgery antiforgery, HttpContext httpContext)
at Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator.GenerateAntiforgery(ViewContext viewContext)
at Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper.Process(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.RunAsync(TagHelperExecutionContext executionContext)
at AspNetCore.sitecore_Sitecore_Plugin_IdentityServer_Views_Account_Login.ExecuteAsync() in C:\inetpub\wwwroot\sc10identityserver.dev.local\sitecore\Sitecore.Plugin.IdentityServer\Views\Account\Login.cshtml:line 15
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultAsync(IActionResult result)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResultFilterAsync[TFilter,TFilterAsync]()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeResultFilters()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)
2020-08-04T16:58:31.6638078+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Route matched with "{action = \"Error\", controller = \"Home\"}". Executing action "Sitecore.Plugin.IdentityServer.Controllers.HomeController.Error (Sitecore.Plugin.IdentityServer)"
2020-08-04T16:58:31.6659368+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executing action method "Sitecore.Plugin.IdentityServer.Controllers.HomeController.Error (Sitecore.Plugin.IdentityServer)" with arguments ([""]) - Validation state: Valid
2020-08-04T16:58:31.6802358+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executed action method "Sitecore.Plugin.IdentityServer.Controllers.HomeController.Error (Sitecore.Plugin.IdentityServer)", returned result "Microsoft.AspNetCore.Mvc.ViewResult" in 13.432ms.
2020-08-04T16:58:32.2436455+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executing ViewResult, running view "Error".
2020-08-04T16:58:32.9816561+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executed ViewResult - view "Error" executed in 1299.2092ms.
2020-08-04T16:58:32.9820978+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Executed action "Sitecore.Plugin.IdentityServer.Controllers.HomeController.Error (Sitecore.Plugin.IdentityServer)" in 1317.7755ms
2020-08-04T16:58:32.9926330+02:00 [INF] (Sitecore Identity/WIN-G4E0D3RI00V) Request finished in 6165.7847ms 500 text/html; charset=utf-8

3 Answers 3

16

Apparently, Sitecore Identity Server included in Sitecore 10 requires .NET Core 2.1.18 Windows Hosting Module.

Problem is that SIA and SIF have in prerequisites config (Prerequisites.json) the installation of this module but in version 2.1.15:

"DotNetHostingDownload": { "Type": "String", "Description": "Download location of .net core 2.1.x Hosting Bundle", "DefaultValue": "https://download.visualstudio.microsoft.com/download/pr/633b17e5-a489-4da4-9713-5ddedf17a5f0/5c18f4203e837dd90ba3da59eee92b01/dotnet-hosting-2.1.15-win.exe" },

When I installed 2.1.18 version of this module, error disappeared and I was able to log in on that machine.

You can find it here: https://download.visualstudio.microsoft.com/download/pr/95f36881-f24a-4e5a-bff9-74dba1c5ae60/04384e05d0ddf9098288c5c01f79ad01/dotnet-hosting-2.1.18-win.exe

1
  • 1
    Been scrawling the net for a solution to this problem. You provided! Thanks!
    – AbdulG
    Commented Mar 16, 2021 at 16:53
1

Adding to Peter's answer for 10.3.1, identity server "Server 7.0 rev. 326 (OnPrem)_identityserver.scwdp". Documentation says 6.0.4 is good, but 6.0.7, which is in prerequisites.json, fails. I fixed by running this to update to 6.0.29:

Install-SitecoreConfiguration -Path .\prerequisites.json -DotNetHostingDownload = 'https://download.visualstudio.microsoft.com/download/pr/b54e1bdd-2525-4414-a93a-27c62b329e47/c34cf7303786e74a20f7125475ffa511/dotnet-hosting-6.0.29-win.exe'  -From "DownloadDotNetMultiTargeting" -To "InstallDotNetMultiTargeting"

Or you can set the value in prereqisites.json. The new download link is: https://download.visualstudio.microsoft.com/download/pr/b54e1bdd-2525-4414-a93a-27c62b329e47/c34cf7303786e74a20f7125475ffa511/dotnet-hosting-6.0.29-win.exe

The source of the link, with checksum, is: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.29-windows-hosting-bundle-installer

0

I got this error too, I had all the required .NET framework and .NET Core runtimes. Was just missing the Url Rewrite module in IIS.

Hope this helps someone.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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