Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi i am just creating the registration page for user to login.
if i use the create wizard control its works fine,
iam following the post of Tim http://umbraco.miketaylor.eu/2010/08/29/authenticating-new-members/
but in method of createuser method
CreateUserWizard cuw = (CreateUserWizard)sender; MembershipUser user = Membership.GetUser(cuw.UserName); if(user ! = null) { string newUserGuid = System.Guid.NewGuid().ToString("N"); MemberProfile me= MemberProfile.GetUserProfile(cuw.UserName); me.AuthGuid= newUserGuid; me.FirstName =((TextBox) cuw.CreateUserStep.ContentTemplateContainer.FindControl("FirstName")).Text; me.MiddleName =((TextBox) cuw.CreateUserStep.ContentTemplateContainer.FindControl("MiddleName")).Text; me.LastName =((TextBox) cuw.CreateUserStep.ContentTemplateContainer.FindControl("LastName")).Text; me.Save(); Roles.AddUsersToRole(cuw.UserName,"SiteMembers"); HyperLink hlAuth = (HyperLink)cuw.CompleteStep.ContentTemplateContainer.FindControl("hlAuth"); if(hlAuth != null) { hlAuth.NavigateUrl ="http://" + Request.ServerVariables["HTTP_HOST"] + Request.ApplicationPath.TrimEnd('/')+ "/auth.aspx?a=" +user.UserName + "&b=" + newUserGuid; hlAuth.Text = hlAuth.NavigateUrl;
its showing the error local variable membership user cannot implicity convert type
system.web.securty.membership to bool
and other error is
Roles.AddUsersToRole(cuw.UserName,"SiteMembers");
the system.web.security.roles.adduser.torole(string[],string) has some invalid arguments
Thanks
Adarsh
What line is getting the first error?
The second error is probably because you are using AddUsersToRole, which is meant to add multiple users to a role and accepts a string array as input, but you are only sending a single string. Try using AddUserToRole instead?
-Tom
Hi Tom, its was my mistake thanks.
the first error is
MembershipUser user =Membership.GetUser(cuw.UserName); if(user !=null)
local variable membership user cannot implicity convert type
Hi..did you figure this out yet? In your first post there is a space between ! and = which would cause this error.
Hi Tom,
i did
thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Registration Form Page
Hi i am just creating the registration page for user to login.
if i use the create wizard control its works fine,
iam following the post of Tim http://umbraco.miketaylor.eu/2010/08/29/authenticating-new-members/
but in method of createuser method
its showing the error local variable membership user cannot implicity convert type
system.web.securty.membership to bool
and other error is
the system.web.security.roles.adduser.torole(string[],string) has some invalid arguments
Thanks
Adarsh
What line is getting the first error?
The second error is probably because you are using AddUsersToRole, which is meant to add multiple users to a role and accepts a string array as input, but you are only sending a single string. Try using AddUserToRole instead?
-Tom
Hi Tom, its was my mistake thanks.
the first error is
local variable membership user cannot implicity convert type
system.web.securty.membership to bool
Hi..did you figure this out yet? In your first post there is a space between ! and = which would cause this error.
Hi Tom,
i did
thanks.
is working on a reply...