Createuser exception handling
- From: "John" <John@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 Aug 2006 01:52:57 +0100
Hi
I am using the membership createuser method but need to find the error when
one arise. I am using the below code;
Public Function CreateUser(ByVal Username As String, ByVal Password As
String, ByVal Email As String, ByRef ErrMsg As String) As Boolean
Try
Membership.CreateUser(Username, Password, Email)
CreateUser = True
Catch ex As MembershipCreateUserException
ErrMsg = ex.StatusCode
CreateUser = False
End Try
End Function
The problem is that as far as I can tell the ErrMsg always returns blank.
What am I doing wrong?
Thanks
Regards
.
- Follow-Ups:
- Re: Createuser exception handling
- From: MikeS
- Re: Createuser exception handling
- Prev by Date: Re: LogonUser access denied
- Next by Date: Re: "ASP.NET Machine Account" problem
- Previous by thread: Problem starting windows forms application from ASP.Net 2.0
- Next by thread: Re: Createuser exception handling
- Index(es):