Asp. NET Web Site Administration Tool configuration

Source: Internet
Author: User
Tags connectionstrings

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.