パスワードのログイン要件を緩和しようとしています。すべての属性を web.config ファイルに設定しましたが、何らかの理由で Type 属性が気に入りません。StackOverflow の web.config メンバーシップに関する他のすべての投稿と他のサイトを見てきましたが、それらはすべて、私が Type に対して行っているのとまったく同じ行を持っているようです。私の検索でも、このエラーについてはあまり見つけられないようです。なぜこのエラーが発生するのかわかりません:
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: Attribute not recognized 'writeExceptionsToEventLog'
Source Error:
Line 16: <clear />
Line 17: <add name="AspNetSqlMembershipProvider"
Line 18: type="System.Web.Security.SqlMembershipProvider"
Line 19: connectionStringName="CafeWorksConnectionString"
Line 20: requiresQuestionAndAnswer="false"
これが私のweb.configファイルです(機密情報を削除するために少し変更されています)
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="validationSettings:UnobtrusiveValidationMode" value="None"/>
</appSettings>
<system.web>
<authentication mode="Forms" />
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
<membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="CafeWorksConnectionString"
requiresQuestionAndAnswer="false"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresUniqueEmail="false" passwordFormat="Hashed"
minRequiredNonalphanumericCharacters="0" writeExceptionsToEventLog="false"
minRequiredPasswordLength="4" passwordStrengthRegularExpression=""
passwordAttemptWindow="10" maxInvalidPasswordAttempts="8"/>
</providers>
</membership>
</system.web>
<system.net>
<mailSettings>
<smtp from="Name@EmailHost.com">
<network host="EmailHost" password="" userName="" />
</smtp>
</mailSettings>
</system.net>
<connectionStrings>
<add name="CafeWorksConnectionString" connectionString="Data Source=DB;Initial Catalog=DBCatalog;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
誰かがこのエラーを修正する方法を知っていれば、助けていただければ幸いです。「writeExceptionsToEventLog」がどこで発生しているのか、なぜエラーが発生しているのか、まったくわかりません。
ありがとうございました!