我的页面上出现以下错误:
Server Error in '/' Application.
The current type, Microsoft.Owin.Security.IAuthenticationManager, is an interface and cannot be constructed. Are you missing a type mapping?
我发现我应该把这个代码放进去
Unityconfig.cs
要解决此问题,请执行以下操作:
container.RegisterType<IAuthenticationManager>(
new InjectionFactory(
o => System.Web.HttpContext.Current.GetOwinContext().Authentication
)
);
但问题是IAuthenticationManager不可见
虽然我添加了
Owin.Security
作为参考,我有
using Microsoft.Owin.Security;
你能给我一些提示吗?