I created a small web application using Visual Web Developer 2010 Express. After I deployed my site and go to the first page, which is the login page that provides a list of users for the app, I get this error:
Exception Details: System.Data.SqlClient.SqlException: User does not have permission to perform this action.
Source Error:
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;
Here is my connectionStrings settings:
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
Why is this error occurring? Any help is much appreciated. I'm currently developing it on a Windows 2008 Server and testing the deployment of it on the same machine.