using Members.Login method to login members (in a surface controller) produces the following error
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
it seems to depend on the username passed through. if i enter [email protected] it works but [email protected] doesn't. the password i'm using is Password1! if it helps reproduce the error.
Can you show a bit more of your code that is running to do this login?
Also, sorry if it's an obvious question, have you double checked that there are members configured with both of those two e-mail addresses?
Members.Login() method error
using Members.Login method to login members (in a surface controller) produces the following error
it seems to depend on the username passed through. if i enter [email protected] it works but [email protected] doesn't. the password i'm using is Password1! if it helps reproduce the error.
any way to avoid this? thanks
Hi Simon,
Can you show a bit more of your code that is running to do this login? Also, sorry if it's an obvious question, have you double checked that there are members configured with both of those two e-mail addresses?
Thanks,
Nik
yes the user is registered and exists. the code is as follows
is working on a reply...