さまざまなグーグル検索で指摘されているように、_appstart.cshtmlでWebSecurity.InitializeDatabaseを呼び出しましたが、WebSecurity.IsAuthenticatedを後で呼び出すと、定期的に以下のエラーが発生します。たとえば、initialisedatabaseはユーザーごとに1回呼び出されると思います。ウェブサイトに入ると、_pagestart.cshtmlが呼び出される前にこの初期化に遅延がありますか?
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()