473,699 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Profiles & Membership

This is a portion of my Web.config file:

<system.web>
<membership defaultProvider ="SqlProvide r">
<providers>
<clear/>
<add name="SqlProvid er"
type="System.We b.Security.SqlM embershipProvid er"
connectionStrin gName="SqlServi ces"
applicationName ="CollegeRepubl icans"
minRequiredPass wordLength="8"
minRequiredNona lphanumericChar acters="0"
enablePasswordR etrieval="true"
enablePasswordR eset="true"
passwordFormat= "Encrypted"
requiresQuestio nAndAnswer="tru e" />
</providers>
</membership>
<profile defaultProvider ="SqlProvide r">
<providers>
<add name="SqlProvid er"
type="System.We b.Profile.SqlPr ofileProvider"
connectionStrin gName="SqlServi ces" />
</providers>
<properties>
<add name="UserName" defaultValue="" allowAnonymous= "true" />
<add name="FirstName " defaultValue="" allowAnonymous= "true" />
<add name="LastName" defaultValue="" allowAnonymous= "true" />
<add name="StreetAdd ress" defaultValue="" allowAnonymous= "true" />
<add name="City" defaultValue="" allowAnonymous= "true" />
<add name="State" defaultValue="" allowAnonymous= "true" />
<add name="ZipCode" defaultValue="" allowAnonymous= "true" />
<add name="EmailAddr ess" defaultValue="" allowAnonymous= "true" />
<add name="HomePhone Number" defaultValue="" allowAnonymous= "true" />
<add name="CellPhone Number" defaultValue="" allowAnonymous= "true" />
<add name="Volunteer " defaultValue="" allowAnonymous= "true" />
</properties>
</profile>
</system.web>



This is how I create a new user and profile:
Try
'Create the profile
ProfileBase.Cre ate(CreateUserW izard.UserName)

'Gather profile information
Profile.UserNam e = CleanString(Cre ateUserWizard.U serName)
Profile.FirstNa me = CleanString(Cus tomProfileInfo. FirstName)
Profile.LastNam e = CleanString(Cus tomProfileInfo. LastName)
Profile.StreetA ddress =
CleanString(Cus tomProfileInfo. StreetAddress)
Profile.City = CleanString(Cus tomProfileInfo. City)
Profile.State = CleanString(Cus tomProfileInfo. State)
Profile.ZipCode = CleanString(Cus tomProfileInfo. ZipCode)
Profile.EmailAd dress = CreateUserWizar d.Email
Profile.HomePho neNumber =
CleanString(Cus tomProfileInfo. HomePhoneNumber )
Profile.CellPho neNumber =
CleanString(Cus tomProfileInfo. CellPhoneNumber )
Profile.Volunte er = CleanString(Cus tomProfileInfo. Volunteer)

'Default each new user to the role of USER
Roles.AddUserTo Role(CreateUser Wizard.UserName , "User")
Catch strError As Exception
'WriteLog(strEr ror.Message)
End Try

This is how I delete a user:
Private Function DeleteUser(ByVa l strUserName As String) As Boolean
Dim blnResult As Boolean = False

Try
'Delete the users profile
If blnResult = ProfileManager. DeleteProfile(s trUserName) = True
Then
'Delete the users membership
If blnResult = Membership.Dele teUser(strUserN ame) = True Then
blnResult = True
End If
End If
Catch strError As Exception
'WriteLog(strEr ror.Message)
End Try

Return blnResult
End Function


There are many problems I am having;
1. When adding a new user sometimes there profile information doesn't get
added
2. When adding a new user sometimes they don't get added to the membership
3. When adding a new user sometimes they over write existing profile
information to current users.
4. When updating a current users profile it creates duplicate profile records
5. When displaying all the user in a GridView using the GetAllUsers method
it doesn't always display every user, if at all.
6. Deleting users does not work, nor does it delete their profile.

Can anyone help?

Thanks

Jun 27 '07 #1
0 1393

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1404
by: Alexandr Zverev | last post by:
Hello! I have to create ASP.NET 2.0 role-based portal with following restrictions: 1. MembershipUsers must be stored in Active Directory 2. Role Membership stored in standard ASP 2.0 SQL database 3. Also there is own SQL Server database with table tblPersons, which users must correlate with ASP users by field PersonID. 4. Some external programs will work with users records, so I must provide some user management API. 5. We must have...
3
6203
by: Jeff | last post by:
Hey asp.net 2.0 I want to populate a GridView with the profile properties off all users registered on a website! For example like this: <profile enabled="true"> <properties>
1
1530
by: R.A.M. | last post by:
Hello, I am learning .NET (3.0). I am writing ASP.NET application and I need to store some extra information (like default settings for each user. In web.config I added: <profile enabled="true"> <properties> <add name="DefaultProject" type="string"/>
0
955
by: =?Utf-8?B?V2FycmVuIFNpcm90YQ==?= | last post by:
I have an e-newletter that I send out. I want to develop a myWSDesigns page that includes a preference for whether someone is a subscriber or not. I've actually developed the page successfully, using both the membership controls and the Profile object with a Subscribe property. Everything seems to persist the way it should. So, now my question is, what do I do when it's time to send out the newsletter? I can see how I could write a join...
2
1572
by: dgk | last post by:
I've got an app that's using SQLServer to store the membership and profile data, in the Aspnetdb database. Now I'm going to be adding another app and I'm concerned about using the same database. They will each have different application names but I think it's probably better to have completely different databases. The aspnet_regsql utility has an option for creating a different database. I guess it's best to use two different databases...
0
1001
by: =?Utf-8?B?QV9SZXB1YmxpY2Fu?= | last post by:
This is a portion of my Web.config file: <system.web> <membership defaultProvider="SqlProvider"> <providers> <clear/> <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlServices" applicationName="CollegeRepublicans"
1
3005
by: =?Utf-8?B?ZVByaW50?= | last post by:
Asp.Net v2.0 I have created a web application and I am using it from a single website and database. The web application has different ‘portals’ – each independent and I am using the Membership & Roles ApplicationName to separate out my different groups of users within the membership database. I had been having problems with ‘random’ bugs - as though my Membership database was 'sharing' information between users and...
2
1666
by: =?Utf-8?B?RWQ=?= | last post by:
I have started creating an application where I make use of User Profiles, to allow users to enter information about themselves. I now find that I wish I could create an "Administrator" account that will allow the administrator to change or edit profile data that a user has placed in their profile. Is it possible in ASP.NET 2.0 to do that? The application is already using an ASP.NET membership database. Thanks in advance...Ed
0
1251
by: emrodge | last post by:
Hi, Any help appreciated on this one. I've set up a simple database with 4 tables & 3 forms. The tables link together on a field called "client id" which is the ID in a table called "Clients". I am trying to write some code behind a button on a form called "Membership & Fee Stats" which navigates to the associated Client record on the Clients form. I was getting an error when clicking the button where the . wasn't populated for some records...
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.