Because the ASP.net membership defaults to using the DBO user to access the data cry, it is common to deploy memebership to a virtual host, which causes the database to be inaccessible, causing memebership to be unusable, and to share some personal experience on how to solve the problem. To avoid any detours:
1. When a memebership database is established on a virtual host (the base virtual host SQL Server database does not provide the dbo user), all [dbo] in the SQL script of the database is membership. and dbo. Removal, so that when the membership database is established, all objects are created using the current connection user.
2, to Microsoft Download membership source code, address: http://download.microsoft.com/download/a/b/3/ Ab3c284b-dc9a-473d-b7e3-33bacfcc8e98/providertoolkitsamples.msi, the default installation (recommended) can be C:Program filesasp.net Provider Toolkit SQL samples, locate the source project, add the project to your solution, and reference the project in the project that you want to use.
3, rewrite membership, The dbo in all source code in the project is Memebership, and the membership project is rebuilt, and a ProviderToolkitSampleProviders.dll file is generated in the bin directory of your project.
4. The membership section in the location Web.config file is as follows:
<membership>
<providers>
<clear/>
<add
Connectionstringname= "Mymemebershipconnectionstring"
Enablepasswordretrieval= "false"
Enablepasswordreset= "true"
Requiresquestionandanswer= "false"
Applicationname= "/"
Requiresuniqueemail= "true"
Passwordformat= "Hashed"
Maxinvalidpasswordattempts= "5"
Minrequiredpasswordlength= "4"
minrequirednonalphanumericcharacters= "0"
passwordattemptwindow= "10"
Passwordstrengthregularexpression= ""
Name= "AspNetSqlMembershipProvider"
Type
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.