Asp. NET Web Site Administration Tool "Security" feature does not work with issues

Source: Internet
Author: User
Tags connectionstrings

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

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.