我得到的错误......
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unable to initialize provider. Missing or incorrect schema.
Source Error:
Line 60: <providers>
Line 61: <remove name="MySQLMembershipProvider" />
Line 62: <add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
Line 63: connectionStringName="InncZone_CS"
Line 64: enablePasswordRetrieval="false"
Source File: C:\Users\Clayton\Coding\Innczone\web.config Line: 62
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248
该网站在其他所有网页上都可以正常使用,但这是注册页面,它给了我这个错误。
我尝试加载的网站。
<%@ Page Title="Register" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
<br />
<asp:CreateUserWizard ID="cuwNewUser" runat="server">
<CreateUserButtonStyle CssClass="btn btn-info btn-lg" />
<WizardSteps>
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" Title="Enter your details">
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
<FinishCompleteButtonStyle CssClass="btn btn-info btn-lg" />
</asp:CreateUserWizard>
</asp:Content>
我已经尝试了十几次寻找答案。请帮忙。
Web.config
<!--MySql.Web-->
<membership defaultProvider="MySQLMembershipProvider" enabled="true" >
<providers>
<remove name="MySQLMembershipProvider" />
<add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
connectionStringName="InncZone_CS"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
applicationName="/"
requiresUniqueEmail="true"
passwordFormat="Clear"
maxInvalidPasswordAttempts="3"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="3"
userTableName="web_user"
userIdColumn="web_userid"
userNameColumn="web_username"
autoGenerateTables="True"
autogenerateschema="true"/>
</providers>
</membership>
<!--passwordStrengthRegularExpression=""-->
<profile defaultProvider="MySQLProfileProvider" enabled="true" >
<providers>
<remove name="MySQLProfileProvider" />
<add name="MySQLProfileProvider" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="InncZone_CS" applicationName="/" />
</providers>
<properties>
<add name="FirstName" />
<add name="Surname" />
<add name="Email" />
<add name="DateOfBirth" type="System.DateTime" />
<add name="ProfilePicture" type="System.Drawing.Image" />
</properties>
</profile>
<roleManager defaultProvider="MySQLRoleProvider" enabled="true" >
<providers>
<remove name="MySQLRoleProvider" />
<add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="InncZone_CS" applicationName="/" />
</providers>
</roleManager>
<siteMap defaultProvider="MySqlSiteMapProvider">
<providers>
<remove name="MySqlSiteMapProvider" />
<add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="InncZone_CS" applicationName="/" />
</providers>
</siteMap>
<webParts>
<personalization defaultProvider="MySQLPersonalizationProvider">
<providers>
<remove name="MySQLPersonalizationProvider" />
<add name="MySQLPersonalizationProvider" type="MySql.Web.Personalization.MySqlPersonalizationProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="InncZone_CS" applicationName="/" />
</providers>
</personalization>
</webParts>
我安装了MySql.Web,并使用Package Manager安装了MySql.Data。 我按照mysql教程网站上的每条指令进行操作。
答案 0 :(得分:0)
我认为问题出在您的提供商配置密钥中的type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
部分。它没有正确的架构结构。
你应该只用type="MySql.Web.Security.MySQLMembershipProvider"
来代替整个事情。