我在Web API 2项目中使用ASP.NET Identity 2.2,但我不确定如何连接使用Autofac的ISecureDataFormat<AuthenticationTicket>依赖项.AccountController
我试过这个:
builder.RegisterType<ISecureDataFormat<AuthenticationTicket>>()
.As<TicketDataFo??rmat>();
Run Code Online (Sandbox Code Playgroud)
并得到错误:
类型'Microsoft.Owin.Security.ISecureDataFormat`1 [Microsoft.Owin.Security.Authenticat ionTicket]'不能分配给服务'Microsoft.Owin.Security.DataHandler.TicketDataFormat'
我遇到的所有问题似乎都没有使用最新的ASP.NET身份稳定版本.
任何帮助是极大的赞赏.
asp.net dependency-injection autofac asp.net-web-api2 asp.net-identity-2