我宣布了2位会员提供商:
SELECT object_id, post_title, max(meta_key_price) as key_price, max(meta_key_image) as key_image FROM
(
SELECT
wp_term_relationships.object_id,
wp_posts.post_title,
case meta_key when 'price' then meta_value else null end as meta_key_price,
case meta_key when 'post_image' then meta_value else null end as meta_key_image
FROM `wp_posts` , wp_postmeta, wp_term_relationships
WHERE (wp_posts.ID = wp_postmeta.post_id)
AND (wp_postmeta.post_id = wp_term_relationships.object_id)
AND wp_term_relationships.term_taxonomy_id =33
) as t group by object_id
但是当我使用其中一个提供程序调用CreateUser时:
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<clear/>
<add connectionStringName="ConnectionString1" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" minRequiredNonalphanumericCharacters="2" minRequiredPasswordLength="8" maxInvalidPasswordAttempts="5" passwordAttemptWindow="30" applicationName="/" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web,Version=2.0.0.0, Culture=neutral, PublicKeyToken=xzxzxz"/>
<add connectionStringName="ConnectionString2" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" minRequiredNonalphanumericCharacters="2" minRequiredPasswordLength="8" maxInvalidPasswordAttempts="5" passwordAttemptWindow="30" applicationName="/" name="AspNetSqlMembershipProviderProduction" type="System.Web.Security.SqlMembershipProvider, System.Web,Version=2.0.0.0, Culture=neutral, PublicKeyToken=xxxx"/>
</providers>
</membership>
我收到此错误:
错误65方法&#39; CreateUser&#39;需要7个参数
答案 0 :(得分:0)
嗯,据我所知它有8个参数检查下面
MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
您缺少'providerUserKey'infact