|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Error: 'CreateUser' is not a member of 'Membership''Membership'. What does that mean? Here's my code. It seems correct (no squigglies, etc...) ' store it in db Dim result As System.Web.Security.MembershipCreateStatus Try Dim newUser As MembershipUser = Membership.CreateUser(Me.txtUsername.Text, Me.txtPassword.Text, Me.txtEmail.Text, Me.ddlSecurityQuestion.SelectedItem.Text, Me.txtSecurityAnswer.Text, False, result) If newUser Is Nothing Then Me.lblUserReject.Text = GetErrorMessage(result) Else Response.Redirect("ThankYouSubmitApp.aspx") End If Catch Me.lblUserReject.Text = "An exception occurred creating the user." End Try Thanks, Robert Thanks.
I followed that example exactly. I still get a build error, 'CreateUser' is not a member of 'Membership'... ------ Build started: Project: 1320Stompers_deploy, Configuration: Debug Any CPU ------ C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /1320Stompers -p C:\work-related\Websites\1320Stompers -u -f -d C:\work-related\Websites\1320Stompers_deploy\1320Stompers_deploy\Debug\ C:\work-related\Websites\1320Stompers\SubmitProfile.aspx.vb(45): error BC30456: 'CreateUser' is not a member of 'Membership'. Done building project "1320Stompers_deploy.wdproj" -- FAILED. ========== Build: 0 succeeded or up-to-date, 2 failed, 0 skipped ========== Here's my code: Dim status As MembershipCreateStatus Try Dim newUser As MembershipUser = Membership.CreateUser(Me.txtUsername.Text, Me.txtPassword.Text, _ Me.txtEmail.Text, Me.txtSecurityAnswer.Text, _ Me.txtSecurityAnswer.Text, False, status) If newUser Is Nothing Then Me.lblUserReject.Text = GetErrorMessage(status) Else Response.Redirect("ThankYouSubmitApp.aspx") End If Catch Me.lblUserReject.Text = "An exception occurred creating the user." End Try I didn't like this line, I guess: Dim newUser As MembershipUser = Membership.CreateUser(Me.txtUsername.Text, Me.txtPassword.Text, _ I restarted VS2005 with the same result. Any ideas? Show quoteHide quote "Henrique Mello" <hme***@gmail.com> wrote in message news:1137108857.770330.100740@g44g2000cwa.googlegroups.com... > Well, hope this helps > > http://msdn2.microsoft.com/en-us/library/system.web.security.membershipcreatestatus.aspx > Fully qualifying it seemed to fix it...
Dim newUser As MembershipUser = System.Web.Security.Membership.CreateUser(Me.txtUsername.Text, BUT, at the top I had put Imports System.Web.Security So that doesn't make sense.... Show quoteHide quote "VB Programmer" <d***@emailme.com> wrote in message news:OcE7r9%23FGHA.3056@TK2MSFTNGP09.phx.gbl... > Thanks. > > I followed that example exactly. I still get a build error, 'CreateUser' > is not a member of 'Membership'... > > ------ Build started: Project: 1320Stompers_deploy, Configuration: Debug > Any CPU ------ > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v > /1320Stompers -p C:\work-related\Websites\1320Stompers -u -f -d > C:\work-related\Websites\1320Stompers_deploy\1320Stompers_deploy\Debug\ > C:\work-related\Websites\1320Stompers\SubmitProfile.aspx.vb(45): error > BC30456: 'CreateUser' is not a member of 'Membership'. > Done building project "1320Stompers_deploy.wdproj" -- FAILED. > ========== Build: 0 succeeded or up-to-date, 2 failed, 0 skipped > ========== > > Here's my code: > Dim status As MembershipCreateStatus > Try > Dim newUser As MembershipUser = > Membership.CreateUser(Me.txtUsername.Text, Me.txtPassword.Text, _ > Me.txtEmail.Text, > Me.txtSecurityAnswer.Text, _ > > Me.txtSecurityAnswer.Text, False, status) > If newUser Is Nothing Then > Me.lblUserReject.Text = GetErrorMessage(status) > Else > Response.Redirect("ThankYouSubmitApp.aspx") > End If > Catch > Me.lblUserReject.Text = "An exception occurred creating the > user." > End Try > > I didn't like this line, I guess: > > Dim newUser As MembershipUser = > Membership.CreateUser(Me.txtUsername.Text, Me.txtPassword.Text, _ > > I restarted VS2005 with the same result. > > Any ideas? > > "Henrique Mello" <hme***@gmail.com> wrote in message > news:1137108857.770330.100740@g44g2000cwa.googlegroups.com... >> Well, hope this helps >> >> http://msdn2.microsoft.com/en-us/library/system.web.security.membershipcreatestatus.aspx >> > >
Other interesting topics
Help: ASP.Net broken (tried usual suspects...)
ASP.NET 2.0 menu: where to set alternate text for "^ up one level Issues with multiple website development on Windows 2000 pro box vs2005: domain trust relationship problem What is the database "standard" in 2.0? Need Step by Step guide for setting up IIS 6 for ASP Question on string DataGrid Columns Spannig More Than One Column XMLHTTP question Visual Web Developer 2005 and .Net 1.0 framework? |
|||||||||||||||||||||||