membership/roles create user problem

J

John

Hi

I have a web service asmx file in a sub folders of site app root folder.
With in the web service I am trying to cerate the user as below;

<WebMethod()> _
Public Function CreateUser(ByVal Username As String, ByVal Password As
String, ByVal Email As String, ByRef ErrMsg As String) As Boolean

Dim newUser As MembershipUser = Membership.CreateUser(Username, Password,
Email, passwordQuestion, passwordAnswer, True, status)
If (newUser Is Nothing) Then
ErrMsg = GetErrorMessage(status)
CreateUser = False
true
CreateUser = True
End If
End Function

The user seems to be created fine but it does not appear in the Web Site
Administration Tool list of users. When I look in the aspnet db, the user is
created in the vw_aspnet_Users table but not in any of the rest of the
tables such as vw_aspnet_MembershipUsers.

What is wrong and how can it be fixed?

Thanks

Regards
 
J

John

Actually the method Membership.CreateUser(Username, Password,Email,
passwordQuestion, passwordAnswer, True, status) was failing and user was not
being properly created. I used Membership.CreateUser(Username,
Password,Email) variation as I did not need/use passwordQuestion ,
passwordAnswer etc. and it worked.

Regards
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top