Where does the MVC3 template store user account information by default?

Can you tell me where the asp.net mvc3 template by default stores login information when registering a new account? It works locally in debug mode.

Without installing SQLExpress, the registration function did not work at all. Since I installed it, I can use the register / login function, but I can not find the table in SQLExpress where such data is stored. SQLExpress has master, model, msdb and tempdb, which are system databases.

Could you help me? Thanks!

+6
source share
1 answer

Take a look at web.config.

<membership> <providers> <clear/> <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="/" /> </providers> </membership> 

Thus, the connected SqlMembershipProvider membership provider using a connection string called ApplicationServices:

 <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> 

So, if you look in App_Data in your project (file system), you will see the aspnetdb.mdf file in which your users are stored.

Here is more information about SQL Server Express.

+7
source

Source: https://habr.com/ru/post/899356/


All Articles