0

私は Nearforum をダウンロードし、MySql で自分の能力を最大限に発揮できるように設定しました。このエラーが発生しています:

    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 49:                <clear/>
    Line 50:                <add name="ForumsMembershipProvider"
    Line 51:                     type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.6.4.0, Culture=neutral"
    Line 52:                     connectionStringName="Forums" 

    Source File: C:\nearforumsc#\web\web.config    Line: 51 

 //This is my config file.

    <?xml version="1.0" encoding="utf-8"?>
    <!--
        For more information on how to configure your ASP.NET application, please visit
        http://go.microsoft.com/fwlink/?LinkId=152368
        -->
    <configuration>
        <configSections>
            <section name="routeMapping" type="NearForums.Configuration.Routing.RouteMappingConfiguration, NearForums" requirePermission="false" />
            <section name="site" type="NearForums.Configuration.SiteConfiguration, NearForums" requirePermission="false" />
            <section name="redirector" type="NearForums.Configuration.Redirector.RedirectorConfiguration, NearForums" requirePermission="false" />
            <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" requirePermission="false" />
        </configSections>
        <appSettings>
            <add key="ClientValidationEnabled" value="true" />
            <add key="UnobtrusiveJavaScriptEnabled" value="true" />
        </appSettings>
        <routeMapping configSource="Config\Routes.config" />
        <site configSource="Config\Site.config" />
        <redirector configSource="Config\Redirector.config" />
        <nlog configSource="Config\Logging.config" />
        <connectionStrings>
            <add name="Forums" connectionString="Server=localhost;Database=nearforum;UID=root;PASSWORD=admin;" providerName="MySql.Data.MySqlClient" />
    <!--
            The above connectionstring with name "forums" will be used by the site.
            Below this line you can see 2 samples of connection strings, one that points to a Microsoft SQL Server database and other that points to a MySql database.
            <add name="ForumsMSSQL" connectionString="Data Source=localhost;Initial Catalog=Forums;User ID=root;Password=admin" providerName="System.Data.SqlClient"/>
            <add name="ForumsMySql" connectionString="Server=localhost;Database=nearforum;UID=root;PASSWORD=admin;" providerName="MySql.Data.MySqlClient"/>
    -->
        </connectionStrings>
        <system.data>
            <DbProviderFactories>
                <remove invariant="MySql.Data.MySQLClient" />
                <add invariant="MySql.Data.MySqlClient" name="MySQL Data Provider" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
            </DbProviderFactories>
        </system.data>
    <!--
        <system.net>
            <mailSettings>
                <smtp deliveryMethod="SpecifiedPickupDirectory" from="admin@yoursite.com">
                    <specifiedPickupDirectory pickupDirectoryLocation="c:\Temp\"/>
                </smtp>
            </mailSettings>
        </system.net>
    -->
        <system.web>
            <authentication mode="Forms" />
            <membership defaultProvider="ForumsMembershipProvider">
                <providers>
                    <clear/>
                    <add name="ForumsMembershipProvider"
                         type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.6.4.0, Culture=neutral"
                         connectionStringName="Forums" 
                         enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="30" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="NearForums"/>

                </providers>
            </membership>
            <compilation targetFramework="4.0">
                <assemblies>
                    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                    <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                </assemblies>
            </compilation>
            <customErrors mode="RemoteOnly"/>
            <pages>
                <namespaces>
                    <add namespace="System.Web.Helpers" />
                    <add namespace="System.Web.Mvc" />
                    <add namespace="System.Web.Mvc.Ajax" />
                    <add namespace="System.Web.Mvc.Html" />
                    <add namespace="System.Web.Routing" />
                    <add namespace="System.Web.WebPages" />
                </namespaces>
            </pages>
            <httpHandlers>
                <remove verb="GET,HEAD,POST" path="*" />
                <add verb="*" path="*" type="NearForums.Web.Handlers.StaticFileHandler, NearForums.Web" />
            </httpHandlers>
            <httpModules>
                <add name="RedirectorModule" type="NearForums.Web.Modules.RedirectorModule, NearForums.Web" />
                <add name="ModelBinderModule" type="NearForums.Web.Modules.ModelBinderModule, NearForums.Web" />
                <add name="CompressionModule" type="NearForums.Web.Modules.CompressionModule, NearForums.Web" />
            </httpModules>
            <httpRuntime requestValidationMode="2.0" />
        </system.web>
    <!-- 
        IIS 7.0.  or above
    -->
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false" />
            <modules runAllManagedModulesForAllRequests="true">
                <add name="RedirectorModule" type="NearForums.Web.Modules.RedirectorModule, NearForums.Web" />
                <add name="ModelBinderModule" type="NearForums.Web.Modules.ModelBinderModule, NearForums.Web" />
            </modules>
        </system.webServer>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
                    <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
    </configuration>
4

1 に答える 1

0

手動で次の行を追加する必要がありました: TY web development, とても時間を浪費するシンプルさのため.

<roleManager enabled="true" defaultProvider="MySqlRoleProvider">
<providers>
<clear />
 <add connectionStringName="MySqlMembershipConnection"
 applicationName="/"
 name="MySqlRoleProvider"
 type="MySql.Web.Security.MySQLRoleProvider, mysql.web"
 autogenerateschema="true"/>
 </providers>
 </roleManager>

 <profile>
 <providers>
 <clear/>
 <add type="MySql.Web.Security.MySqlProfileProvider, mysql.web"
 name="MySqlProfileProvider"
 applicationName="/"
 connectionStringName="MySqlMembershipConnection"
 autogenerateschema="true"/>
 </providers>
 </profile>
于 2013-03-01T02:10:22.787 に答える