次のコンパイル エラーが発生します。
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'WebSecurity' does not exist in the current context
Source Error:
Line 1: @{
Line 2: if (!WebSecurity.Initialized)
Line 3: {
Line 4: WebSecurity.InitializeDatabaseConnection("AreaProject", "User", "UserId", "EmailAddress", autoCreateTables: true);
Source File: c:\Projects\area\trunk\dotNet\area.Web\area.Web\_AppStart.cshtml Line: 2
enter code here
私のプロジェクトは「System.Web」を正しく参照しており、「System.Web.Security」を使用している他のファイルは正常にコンパイルされています。
この問題は、System.Web、System.Web.Pages、および System.Web.Razor の参照をアプリケーションに追加したときに始まりました。しかし、WebMatrix.WebData または WebMatrix.Data には変更を加えていません。