The address specified '[PII is hidden]' is not valid as per HTTPS scheme.

 Resolution:

Since I tried to move my Sitecore MVP application from Docker to the Sitecore 10.2 Vanilla instance and, the OKTA settings weren't added to the config file. So, added OKTA values in Foundation.User.IdentityProvider.config and the page loaded.

Error:

Server Error in '/' Application.

IDX20108: The address specified '[PII is hidden]' is not valid as per HTTPS scheme. Please specify an https address for security reasons. If you want to test with http address, set the RequireHttps property  on IDocumentRetriever to false.
Parameter name: address

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: IDX20108: The address specified '[PII is hidden]' is not valid as per HTTPS scheme. Please specify an https address for security reasons. If you want to test with http address, set the RequireHttps property  on IDocumentRetriever to false.
Parameter name: address

Source Error:

Line 84:             try
Line 85:             {
Line 86:                 OpenIdConnectConfiguration config = Task.Run(_configManager.GetConfigurationAsync).Result;
Line 87:                 _issuer = config.Issuer;
Line 88:                 _keys = config.SigningKeys;


Source File: C:\projects\MVP-Site\src\Foundation\User\platform\OpenIdConnectCachingSecurityTokenProvider.cs    Line: 86

Stack Trace:

[ArgumentException: IDX20108: The address specified '[PII is hidden]' is not valid as per HTTPS scheme. Please specify an https address for security reasons. If you want to test with http address, set the RequireHttps property  on IDocumentRetriever to false.
Parameter name: address]
   Microsoft.IdentityModel.Protocols.<GetDocumentAsync>d__8.MoveNext() +270
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   Microsoft.IdentityModel.Protocols.OpenIdConnect.<GetAsync>d__3.MoveNext() +391
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   Microsoft.IdentityModel.Protocols.<GetConfigurationAsync>d__24.MoveNext() +865

[InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII is hidden]'.]
   Microsoft.IdentityModel.Protocols.<GetConfigurationAsync>d__24.MoveNext() +1570
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +32
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +62
   Microsoft.IdentityModel.Protocols.<GetConfigurationAsync>d__23.MoveNext() +314

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) +4602897
   Mvp.Foundation.User.OpenIdConnectCachingSecurityTokenProvider.RetrieveMetadata() in C:\projects\MVP-Site\src\Foundation\User\platform\OpenIdConnectCachingSecurityTokenProvider.cs:86
   Mvp.Foundation.User.OpenIdConnectCachingSecurityTokenProvider..ctor(String metadataEndpoint) in C:\projects\MVP-Site\src\Foundation\User\platform\OpenIdConnectCachingSecurityTokenProvider.cs:30
   Mvp.Foundation.User.Pipelines.IdentityProviders.HeadlessOktaIdentityProvider.ProcessCore(IdentityProvidersArgs args) in C:\projects\MVP-Site\src\Foundation\User\platform\Pipelines\IdentityProviders\HeadlessOktaIdentityProvider.cs:73
   (Object , Object ) +9
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +1268
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   (Object , Object ) +14
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +1268
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +132
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146
   Owin.Loader.<>c__DisplayClass19_1.<MakeDelegate>b__0(IAppBuilder builder) +93
   Owin.Loader.<>c__DisplayClass9_0.<LoadImplementation>b__0(IAppBuilder builder) +224
   Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +897
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +51
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +101
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +139
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +160
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +584
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4330.0

Comments