When you use the ASP. NET Web Site Administration tool, the following issues occur safely:
The main reason for this is that the user and role information needs to be created in security management, so the database is used, but you do not have a database set up.
You can open the command prompt tool with VS comes with:
Open and enter the Aspnet_regsql command, set the database, and go directly to the next, until you select the database interface
Can be directly selected < default > can also select a different database (I choose STUDB here) to store user information and role information, set up in this database will automatically generate about 10 more tables, these tables are used to do rights management.
After the above operation, if you choose the database is not < default, you may still not be able to use the "security" function, the main reason is that your connection string has not changed.
Enter C:\Windows\Microsoft.NET\Framework to find the corresponding version,
Then go to config folder, there will be a Machine.config file, open this file will find:
<connectionStrings>
<add name= "LocalSqlServer" connectionstring= "Data source=.\sqlexpress;integrated Security=sspi; attachdbfilename=| Datadirectory|aspnetdb.mdf; User instance=true "providername=" System.Data.SqlClient "/>
</connectionStrings>
This connection string is actually just the connection string for the < default > database
Because the database I chose is studb, this connection string is not correct and the connection string is modified to STUDB:
<connectionStrings>
<add name= "LocalSqlServer" connectionstring= "server=.; Database=studb;uid=sa;pwd=sasa "providername=" System.Data.SqlClient "/>
</connectionStrings>
The "security" feature is now available.
Asp. NET Web Site Administration Tool "Security" feature does not work with issues