title: Using membership functions return user data on development site and not on production site
body: <p>I've created an asp.net page (not MVC) using the out-of-box template that is created by VS 2010, which includes login controls, using forms authentication. The page provides data review and editing for users in our offices around the Southwest. I am able to access simple enough information from the login database such as names, roles, and email addresses.</p>
  
  <p>The development site and the production site are both on my development computer, if that makes sense. Our actual production site is still under construction, but users are accessing the site through my computer set up as an asp.net server.</p>
  
  <p>At any rate, what I need to do is to create an administrative feature that allows me or other admin users to make changes to the membership data, such as updating email addresses or deleting users.</p>
  
  <p>Using the Membership class, I am able to access the membership data on the development site, but when I deploy it to the (temp) production site it still shows the user data on the development site.</p>
  
  <p>It's clear that the site on the production server is working fine for our users -- i.e. they are able to create their user accounts and to actually log in; but the membership class does not show any of the actual users, only my faux users in the development space.</p>
  
  <p>My web.config file contains these lines:</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /&gt;
      &lt;add name="ConnectionString" connectionString="Data Source=MAINSERVER\SQLEXPRESS;Initial Catalog=XYZ;Integrated Security=True" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Which seems like it ought to point to the aspnetdb.mdf file in the operating folder.</p>
  
  <p>I've added a gridview just to get familiar with how this all words, and the VB codebehind includes the following lines: </p>
  
  <pre><code>GridView1.DataSource = Membership.GetAllUsers
  GridView1.DataBind()
  </code></pre>
  
  <p>Which works great except it only shows the users in the development site.</p>
  
  <p>I clearly do not understand the login/membership structure.</p>
  
  <p>Can anyone shed some light on this for me?</p>
  
  <p>EDIT: per request from Win----</p>
  
  <p>From the Debug folder:</p>
  
  <pre><code>&lt;membership&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/&gt;
    &lt;/providers&gt;
  &lt;/membership&gt;
  &lt;roleManager enabled="true"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider"/&gt;
      &lt;add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider"/&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  </code></pre>
  
  <p>from the production folder:</p>
  
  <pre><code>&lt;membership&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/&gt;
    &lt;/providers&gt;
  &lt;/membership&gt;
  &lt;roleManager enabled="true"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider"/&gt;
      &lt;add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider"/&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  </code></pre>
  
  <p>Near as I can tell, they're identical, and nothing there gives me a clue how to fix it. I hope you can spot it! Thanks!</p>