I pretty New at IOC and web-api 2, but have got StructureMap to work on my own Controllers in web-api 2. What I don't have managed is to use StructureMap on the AccountController using Individual Accounts. I use AccountController out of the Box, and what I have managed so far is following:
In Ioc.cs I have added following (Because of errors)
x.For<IUserStore<ApplicationUser>>().Use<UserStore<ApplicationUser>>(); x.For<DbContext>().Use(() => new ApplicationDbContext()); x.For<ISecureDataFormat<AuthenticationTicket>() .Use<SecureDataFormat<AuthenticationTicket>>();
But now I'm stuck With this error:
"No default Instance is registered and cannot be automatically determined for type IDataSerializer<AuthenticationTicket>"
I realy dont know what to do here. I have tried to find a detault instance of IDataSerializer, but no Luck.
By the way... I have installed the Nuget package "Structuremap.webapi2"