0
我已經調用了_appstart.cshtml中的WebSecurity.InitializeDatabase,如各種谷歌搜索中所述,但定期在繼續調用WebSecurity.IsAuthenticated時收到以下錯誤,例如,我會假設初始化數據庫每次進入網站的用戶都會調用一次,在調用_pagestart.cshtml之前是否存在這種初始化的延遲?WebMatrix WebData InitializeDatabaseConnection
You must call the "WebSecurity.InitializeDatabaseConnection" method before you call any other method of the "WebSecurity" class. This call should be placed in an _AppStart.cshtml file in the root of your site.
at WebMatrix.WebData.SimpleMembershipProvider.VerifyInitialized()
at WebMatrix.WebData.WebSecurity.VerifyProvider()
at WebMatrix.WebData.WebSecurity.Logout()
at ASP._Page__PageStart_cshtml.Execute()