In the Sitecore doc Configuring Federated Authentication there are instructions to generate the URL links to initiate Federated Auth -- the lines are:
using Sitecore.Pipelines.GetSignInUrlInfo;
/*
[...]
*/
var args = new GetSignInUrlInfoArgs(site: "website", returnUrl: "/");
GetSignInUrlInfoPipeline.Run(corePipelineManager, args);
How do I get an instance of the corePipelineManager
in order to pass to the GetSignInUrlInfoPipeline
? I tried using the
var corePipelineManager = Sitecore.DependencyInjection.ServiceLocator.ServiceProvider.GetService<BaseCorePipelineManager>();
But am getting an error below:
CS1928: 'System.IServiceProvider' does not contain a definition for 'GetService' and the best extension method overload 'System.Web.Mvc.DependencyResolverExtensions.GetService(System.Web.Mvc.IDependencyResolver)' has some invalid arguments
var corePipelineManager = Sitecore.DependencyInjection.ServiceLocator.ServiceProvider.GetService(typeof(BaseCorePipelineManager));
? – Marek Musielak Feb 23 '18 at 18:52