Visual Web Developer 2010 Express を使用して小さな Web アプリケーションを作成しました。サイトをデプロイして最初のページ (アプリのユーザーのリストを提供するログイン ページ) に移動すると、次のエラーが発生します。
例外の詳細: System.Data.SqlClient.SqlException: ユーザーには、このアクションを実行する権限がありません。
ソース エラー:
Line 22: public ActionResult LogOn()
Line 23: {
Line 24: var users = Membership.GetAllUsers().Cast<MembershipUser>().ToList();
Line 25: SelectList usernames = new SelectList(users);
Line 26: ViewBag.UserNames = usernames;
これが私のconnectionStrings設定です:
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
なぜこのエラーが発生するのですか? どんな助けでも大歓迎です。現在、Windows 2008 Server で開発し、同じマシンで展開をテストしています。