I have been learning ASP. NET over the past few days, but the problem persists during database connection because the following error occurs during Security Configuration:
The following error occurs in the selected data storage area. The reason may be that the server name or credential is invalid or the permissions are insufficient. It may also be caused by the absence of the role manager function. Click the following button to redirect to the page where you can select a new data storage area. The following message may help diagnose the problem: unable to connect to the SQL Server database.
Later, I tried Baidu on the Internet and finally found a solution. Post the solution first:
1. Open the command prompt of Vs, enter aspnet_regsql, and use the default database (aspnetdb ).
2. Open Vs and choose tools> Options> database tools> data connection> SQL server instance name (empty by default) to change it to your server name.
3. For vs, tool --> connect to database --> server name (select the server you just selected), you can select windows or SQL Server for authentication as required, and then select aspnetdb for the database. After the test is OK, copy the Statement data source = server; initial catalog = aspnetdb; user id = SA in the advanced section.
4. Open IIS: default website --> properties --> Asp. net --> edit global configuration --> General --> change the connection string of the connection string manager localsqlserver to: Data Source = server; initial catalog = aspnetdb; user id = sa; password = SA ("; Password = sa" is not copied. it is manually entered. Of course, SA will be replaced with your password ).
5. Go to IIS: default website --> properties --> Asp. Net --> edit global configuration --> authentication --> select "enable role management"