I have been learning ASP.NET by experimenting, watching videos on ASP.NET, and reading forums. I haven’t found a quick solution to this though.
Whenever I add the ‘login’ or ‘createuserwizard’ from the toolbox it always adds the new users to a database known as ‘ASPNETDB.MDF’ even if I specify the remote database using a new SqlDataSource.
Is there an easy way to save the login information? Any tutorials that helped you?
By default, ASP.NET will use a local file based database to store the login information.
If you want to use a different database, you need to do a couple of things:
In the ConnectionStrings section of the web.config add your new ConnectionString:
In the MembershipProvider section of the web.config, ensure the ConnectionString attribute is set to the same name as your connection string (other settings elided for berevity):
If you are using Roles or Profiles you’ll want to ensure that they are also using your connectionstring to store everything together, and ensure that the applicationName attribute is common between them.