I'm getting HTTP Error 500.0 - Could not find type 'GeoIP.GeoIPInformation.ExampleContextExtension,GeoIP' for below piece of code and patch file.
can anyone help on this please.
Code:
namespace GeoIP
{
public class GeoIPInformation
{
public class ExampleContextExtension : Sitecore.JavaScriptServices.ViewEngine.LayoutService.Pipelines.GetLayoutServiceContext.JssGetLayoutServiceContextProcessor
{
public ExampleContextExtension(IConfigurationResolver configurationResolver) : base(configurationResolver)
{
}
protected override void DoProcess(GetLayoutServiceContextArgs args, AppConfiguration application)
{
//var w = Sitecore.CES.GeoIp.Core.Lookups.LookupManager.GetWhoIsInformationByIp("193.200.33.51");
args.ContextData.Add("securityInfo", new
{
isAnonymous = !Sitecore.Context.User.IsAuthenticated
});
//args.ContextData.Add("GeoIPInfo", new
//{
// // isAnonymous = !Sitecore.Context.User.IsAuthenticated,
// GeoIPInfo = w.ToString()
//});
}
}
}
}
Patch file:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<group groupName="layoutService">
<pipelines>
<getLayoutServiceContext>
<processor type="GeoIP.GeoIPInformation.ExampleContextExtension,GeoIP" resolve="true" />
</getLayoutServiceContext>
</pipelines>
</group>
</pipelines>
</sitecore>
</configuration>