Power BI

Content by Charles Sterling

CreateUser Samples in ASP.NET 2.0 not working

In going through my samples for tonights user group i found i could not get the overloads for CreateUser working that didn’t supply all the parameters…Even the samples on MSDN

weren’t working for me.

I wish i could say it was through superiour debugging prowess i fgured it out when actualaty it ended being GeoffAppleby  reading the documentation to figured it out<g>

Thanks Geoff!

In either case the cause was the config setting below defaults to true…



More complete Sample below


Protected Sub CreatUser_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserlnk.Click

Dim newUser As MembershipUser = Membership.CreateUser(UsernameTextbox.Text, PasswordTextbox.Text,email.text)

End Sub




<add name=”ASPNETDBConnectionString1″ connectionString=”Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True”

providerName=”System.Data.SqlClient” />




Set compilation debug=”true” to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.



<allow users=”?” />


<roleManager enabled=”true” />

<membership defaultProvider=”SqlProvider” userIsOnlineTimeWindow=”20″>


<remove name=”AspNetSqlProvider” />

<add name=”SqlProvider”







applicationName=”/” />