Createuser exception handling

Discussion in 'ASP .Net Security' started by John, Aug 28, 2006.

  1. John

    John Guest

    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
     
    John, Aug 28, 2006
    #1
    1. Advertising

  2. John

    MikeS Guest

    MikeS, Aug 28, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Gilkey
    Replies:
    1
    Views:
    731
  2. =?Utf-8?B?UG9ydG1hbg==?=

    ASP.NET 2.0 Membership CreateUser method

    =?Utf-8?B?UG9ydG1hbg==?=, Jan 5, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    1,138
    =?Utf-8?B?UG9ydG1hbg==?=
    Jan 5, 2006
  3. VB Programmer
    Replies:
    3
    Views:
    932
    VB Programmer
    Jan 13, 2006
  4. John

    Createuser exception handling

    John, Aug 28, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    441
    Ken Cox [Microsoft MVP]
    Aug 28, 2006
  5. John

    Createuser exception handling

    John, Aug 28, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    111
    Ken Cox [Microsoft MVP]
    Aug 28, 2006
Loading...

Share This Page