2014-10-05 26 views
7

私人IAuthenticationManager的AuthenticationManager { 得到 { 回報HttpContext.GetOwinContext()認證。 }} 在MVC 5標識的電子郵件驗證工作

我得到的錯誤:「System.Web.HttpContextBase」不包含「GetOwinContext」的定義,並沒有擴展方法「GetOwinContext」接受一個類型的第一個參數「System.Web.HttpContextBase」可能被發現(你是否缺少using指令或程序集引用?)什麼可能是錯誤的?

回答

20

看來你已經失蹤了一個名爲'Microsoft.Owin.Host.SystemWeb'的NuGet包。從NuGet安裝軟件包或使用軟件包管理器控制檯安裝軟件包。

安裝,包裝Microsoft.Owin.Host.SystemWeb

希望這有助於。

+1

謝謝老兄!它有幫助。 – Sooner 2014-10-05 11:58:48

+0

http://stackoverflow.com/questions/21148209/asp-net-identity-httpcontext-has-no-extension-method-for-getowincontext – 2016-01-18 08:07:24