Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Cannot config Service Api with Asp.net Identity

Fixed in

EPiServer.ServiceApi 3.0.0

(Or a related package)

Created

Nov 04, 2016

Updated

Feb 13, 2017

Area

Service API

State

Closed, Fixed and tested


Description

Since there is no official document about config ServiceApi with AspNet Identity. I tried to config ServiceApi to work with AspNet Identity following this blog: http://marisks.net/2016/08/31/service-api-authentication-with-new-identity/ but I can't make it work. When get access token it return error 500, and on server the log file show:

2016-11-04 10:10:51,910 [584] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
EPiServer.ServiceLocation.ActivationException: Activation error occurred while trying to get instance of type SignInManager`2, key "" ---> StructureMap.StructureMapConfigurationException: No default Instance is registered and cannot be automatically determined for type 'IUserStore<ApplicationUser, String>'
 
There is no configuration specified for IUserStore<ApplicationUser, String>

The error happens on CMS9 MVC, ServiceApi 2.0.11.

The fix to this problem is explained in "Upgrading to Service API 3" (http://world.episerver.com/documentation/upgrading/episerver-service-api/service-api-3/).