I get the following error:
Server Error in '/' Application.
Specified method is not supported.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: Specified method is not >supported.
Source Error:
Line 109: modelo.apellido = usuario.apellido;
Line 110: modelo.nombre = usuario.nombre;
-->Line 111: modelo.clave = Membership.GetUser(usuario.userName).GetPassword();<--
Line 112:
Line 113: return PartialView(modelo);
This is my Web.Config:
<membership defaultProvider="SimpleMembershipProvider">
<providers>
<clear/>
<add name="SimpleMembershipProvider"
type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData"
connectionStringName="DefaultConnection"
enablePasswordRetrieval="true"
enablePasswordReset="true"
passwordFormat="Encrypted"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="true"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
applicationName="/"/>
</providers>
</membership>
<roleManager enabled="true" defaultProvider="SimpleRoleProvider">
<providers>
<add name="SimpleRoleProvider"
type="WebMatrix.WebData.SimpleRoleProvider, WebMatrix.WebData"
connectionStringName="DefaultConnection"
applicationName="/" />
</providers>
</roleManager>
I tried this but when I debug, the enablePasswordRetrieval property of the Membership class is set to "false".
Thanks.