[英]Could not load type '…' from assembly 'System.Web, …'
<system.web>
<profile defaultProvider="TestProfileProvider" inherits="Test.Library.UserAccountProvider.TestUserProfile">
<providers>
<add name="TestProfileProvider" type="Test.Library.UserAccountProvider.TestProfileProvider, , Test.Library.UserAccountProvider" connectionStringName="SecurityContext" applicationName="Sigma" applicationContext="XpressPago" />
</providers>
</profile>
<membership defaultProvider="TestMembershipProvider">
<providers>
<add name="TestMembershipProvider" type="Test.Library.UserAccountProvider.TestMembershipProvider, Test.Library.UserAccountProvider" connectionStringName="SecurityContext" passwordFormat="Clear" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="Sigma" PasswordResetLimit="45" applicationContext="XpressPago" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="TestRoleProvider">
<providers>
<add name="TestRoleProvider" type="Test.Library.UserAccountProvider.TestRoleProvider" connectionStringName="SecurityContext" applicationName="Sigma" applicationContext="XpressPago" />
</providers>
</roleManager>
<httpRuntime executionTimeout="90" maxRequestLength="1048576" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>
<machineKey validationKey="196975F087819B74AC983A6D0882E5936BD0F30915A770C58E1177505D72D46F2D6F50BDB35DDF4E904AE01FD3E62726A6E63ADED231644D2D2E595A84AA76B2" decryptionKey="4496E865CAED30BA35BE7B60A06023CC3A13422F15060346" validation="SHA1" />
</system.web>
TestMembershipProvider
is not showing any error but TestUserProfile
is showing the following error: TestMembershipProvider
未显示任何错误,但TestUserProfile
显示以下错误:
Could not load type 'Test.Library.UserAccountProvider.TestUserProfile' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
无法从程序集'System.Web,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'加载类型'Test.Library.UserAccountProvider.TestUserProfile'。
on statement return (TestUserProfile)Create(username);
on语句
return (TestUserProfile)Create(username);
Maybe you should add the full assembly name (", Test.Library.UserAccountProvider") at the end of 'type' attribute of the line with name="TestProfileProvider" if its the location of your class ? 也许你应该在行的'type'属性的末尾添加完整的程序集名称(“,Test.Library.UserAccountProvider”),如果你的类的位置是name =“TestProfileProvider”?
Like this : 像这样 :
<add name="TestProfileProvider" type="Test.Library.UserAccountProvider.TestProfileProvider, Test.Library.UserAccountProvider" connectionStringName="SecurityContext" applicationName="Sigma" applicationContext="XpressPago" />
And the same for the 'inherits' attribute : 对于'inherits'属性也一样:
<profile defaultProvider="TestProfileProvider" inherits="Test.Library.UserAccountProvider.TestUserProfile, Test.Library.UserAccountProvider">
I think Create does not where to pick the class since it tries in "System.Web". 我认为Create不会选择该类,因为它尝试“System.Web”。
Of course I suppose Test.Library.UserAccountProvider is the right assembly name, fix it if needed... 当然我认为Test.Library.UserAccountProvider是正确的程序集名称,如果需要可以修复它...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.