I want to use the ASP. NET WEB Application Management tool to add authentication.
Click on the project->asp.net configuration to open the ASP. NET Site Administration Tool page:
Then click on the Security tab and the following questions appear:
There is a problem with your selected data store. This can is caused by a invalid server name or credentials, or by insufficient permission. It can also is caused by the Role Manager feature not being enabled. Click the button below to is redirected to a page where you can choose a new data store.
The following message may diagnosing the problem:Unable to connect to SQL Server database.
The programming environment used by the author is VS2012.
Workaround:
A detailed introduction to the referenceASPIntroduction to login controls in 2.0
in which the article mentions theAsp. NETWeb Site Administration ToolThe security needs some relevant settings to be applied, the specific setting method is as follows:
(MICROsoft MSDN:HTTP://FORUMS.MICROsOFT.COM/MSDN/SHOWPOsT.Aspx?pOstid=81990&siteid=1&pageid=0
)
build on your SQL ServerASP2.0 of the application support data, need to establish some tables, the default is placed inAspNetdb in the database. While the installation did not generateAspNETDB Database So there was an error.
First, run aspNet_regsql (c+ + windows\microsoft.net\framework\v2.0.50727\asp Net_regsql.exe) to install the database to be established by membership .
Select SQL Authentication in the wizard and enter the user name and password for the database (previously built).
then, modify the Web. config file on the machine (c \Windows\MICROsoft.net\framework\v2.0.50727\config\web.config) or a Web. config file for the project.
pay attention to <connectionStrings> ... </connectionStrings> this section
In the Project Web. config, add the following statement:
<connectionStrings>
<remove name= "LocalSqlServer"/>
<add name= "LocalSqlServer"
connectionstring= "Data source=think-pc;initial catalog=aspnetdb; Persist Security info=true; User Id=sa; password=123456 "
Providername= "System.Data.SqlClient"/>
</connectionStrings>
Success!