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 test@hotmail.com it works but test2@hotmail.com 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 test@hotmail.com it works but test2@hotmail.com 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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.