Working in MVC 5 Identity for email verification

南楼画角 提交于 2019-12-06 17:25:22

问题


private IAuthenticationManager AuthenticationManager { get { return HttpContext.GetOwinContext().Authentication; } }

I get the error : 'System.Web.HttpContextBase' does not contain a definition for 'GetOwinContext' and no extension method 'GetOwinContext' accepting a first argument of type 'System.Web.HttpContextBase' could be found (are you missing a using directive or an assembly reference?) What might be wrong?


回答1:


It seems you have missing NuGet package called 'Microsoft.Owin.Host.SystemWeb'. Install package from NuGet or use package manager console to install the package.

Install-Package Microsoft.Owin.Host.SystemWeb

Hope this helps.



来源:https://stackoverflow.com/questions/26200043/working-in-mvc-5-identity-for-email-verification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!