Security :: Want To Use Profile And Have A Profile Property?

Dec 5, 2010

I'm being stupid but don't know what I'm missing.I want to use profile and have a profile property.So in the webconfig for my site I've added:

<add name="Name"/>

But in the code behind a page I cannot use Profile.Visual Studio is just saying the Profile is not known in the current context.Thus I cannot do

Profile.Name = ....
x = Profile.GetPropertyValue(....)

View 13 Replies

Similar Messages:

Security :: Creating A Profile For A New User Is Updating Other Profile

Feb 4, 2010

I am logged in as user1, and while creating a user in which I have additional information which would store first and last name into the profile database. I have the following code


But because I just have profile like that, it is updating the profile of user1 not the new user i just created


View 5 Replies

Security :: Using Profile Shopping Cart Property With Web Application?

Mar 15, 2010

I know how to use Profile Shopping cart property with Web site but i can't use it with web application

if you can refere me to any post explains how to use Profile Shopping cart property with Web application.

For example if i used this code in web application does not work but it works in website!


View 1 Replies

Security :: Delete A Property Of The Logged In User In Profile?

Feb 12, 2010

I need to delete the user email once user is loged in and clics Delete Email/ Address/ Tel. I store user information in profile.common


this gets me the current user, next i need to delete this users email/ phone.

View 1 Replies

Security :: Save Custom Property Into Member Using Profile?

Jan 14, 2011

I have been struggling to save custom property data into member using createuserwizard. I add some extra fields into createuserwizard using wizardsteps and What I would like to accomplish is to save extra data of that fields and see that data on admin backend of member section of umbraco cms.

What I have done so far in brief:

Created a user control using createuserwizard and save it to umbraco.

I also added a macro into usercontrol which pulls its data from dropdown list multiple render control data type which has some prevalues.

After selecting values and creating user, none of the selected values of dropdown list multiple render control data type are selected on admin backend but address are successfully saved.

Code behind file:Roles.AddUserToRole(UserName.Text, "BasicUsers");var profile = System.Web.Profile.ProfileBase.Create(UserName.Text);profile["sector"] = Sector.SelectedItem.Value;profile["address"] = Address.Text;profile.Save();

That relevant code snippet above works well like profile["address"] = Address.Text; but I am unable to save with other renders controls as Dropdown list multiple.

View 4 Replies

Security :: Make Readonly Profile Property Writable On Admin Page?

Jan 26, 2010

Is it possible to allow an administrator to write to a readonly profile property by redefining the profile property in a web.config file used for administrators pages?

I have a unique account number which must be assigned to each new user (using the default membership provider). After reading a couple of articles it seemed it would just be easier to define it as a profile property instead of creating a custom membership provider. When the user makes changes to their profile on a profile page I create, I want the value to be readonly. When an admin views the profile I actually want them to assign the value to the property in their page.

View 1 Replies

Web Forms :: Profile Service Error - Unable To Load User Profile In Iis?

Jan 3, 2011

I am using profile services to store some attributes of users registered in the website. Now I am making a display profile page for a user. The problem is that the profile loads easily when I am running the site from VS 2010, but it gives the following error when I run it from IIS7 on my local machine:

System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:



View 4 Replies

Web Forms :: Writing To Profile With Multiple Profile Providers?

Aug 6, 2010

I'm trying to update/create the user profile for a specific user that will not be the logged on user of the moment. I'm able to do this with the following code:

'Dim p As ProfileBase = ProfileBase.Create(Email, False)

View 3 Replies

How To Add A Default Value To A Custom Profile Property

Jun 16, 2010

I know you can add defaultValues using the web.config like this:

<add name="AreCool" type="System.Boolean" defaultValue="False" />

but I have the Profile inherited from a class:

<profile inherits="CustomProfile" defaultProvider="CustomProfileProvider" enabled="true">
<clear />
<add name="CustomProfileProvider" type="CustomProfileProvider" />

Heres the class:

Public Class CustomProfile
Inherits ProfileBase
Public Property AreCool() As Boolean
Return Me.GetPropertyValue("AreCool")
End Get
Set(ByVal value As Boolean)
Me.SetPropertyValue("AreCool", value)
End Set
End Property
End Class

I don't know how to set the default value of the property. Its causing errors because without a default value, it uses an empty string, which cannot be converted to a Boolean. I tried adding <DefaultSettingValue("False")> _ but that didn't seem to make a difference.

I'm also using a custom ProfileProvider (CustomProfileProvider).

View 2 Replies

Unable To Get The 'Profile' Property In The Code Behind?

Mar 10, 2010

I have added some profile properties to my web.config:

<profile automaticSaveEnabled ="true">
<add name="NumVisits" type="System.Int32"/>
<add name="UserName" type="System.String"/>
<add name="Gender" type="bool"/>
<add name="Birthday" type="System.DateTime"/>

However when I try to access the property in a code behind it does not exist. The following code does not work (says firstname is not a property):

Profile.Gender And In the Configuration 'Profile tab ' Is not showing. I have rebuilt the solution. I am using VB.NET(3.5)

View 1 Replies

Web Forms :: Override The Profile Property In System.Web.Ui.MasterPage?

Dec 2, 2010

I whould like to override the Profile property in the System.Web.Ui.MasterPage class with my very own property.

I have tried to do the following:


But that doesnt work since the property doesnt exist in the System.Web.Ui.MasterPage..cause it exists in a class that the MasterPage class inherits..or atleast what I have read at some other sites.. it even possible to do this sort of an override?..and if its possible..then how?

View 3 Replies

Web Forms :: Get User List Based On Specific Profile Property

Sep 4, 2010

I am trying to query a DB and get a list of users based on a specific boolean property stored in the aspnet_profile for that user. I am aware that it wasn't possible a few years ago [URL] but was wondering whether that had changed in recent releases, or it was still not possible without trawling through the entire list of users and testing them one by one. (My DB may become way to big for that.)

View 3 Replies

Delete An Unrequired User Profile Property From Web.config And The Database?

Oct 30, 2010

I use the default ASP.NET Profile Provider which lets me define user properties in web.config.

I now no longer want to use one of these user properties. I want to delete all traces of it.

I can remove the property from the list of properties in web.config however, I suspect, the stored values for this property will still be held in the aspnet_Profile table for each user.

Is there an easy way to clean out all traces of the data for a property that's no longer used from the aspnet_Profile table?

View 1 Replies

Web Forms :: Profile Property For Anonymous Users Not Saving In Firefox Or Safari?

Aug 4, 2010

I have a user control which, when pressing a command button, sets a property for the Profile (which has been marked as allowanonymous=true), then save it using Profile.Save().

Now, in IE this works fine - no problems at all. I then go to the page where the value is used - and it's there and can be used.

However, exactly the same routine when running in Safari or Firefox doesn't work - although when you're on the same page where the value is set it will immediately state that the value is ok, do a postback and it's gone!

Here's some very simple code to show the problem. Whilst IE will always dump 'plop true/false' to the screen (yes, I know - very juvenile!), FF and Safari will the first time, but on postback will just dump True to indicate it's a postback. (oh, and autosaveprofile is set to true in this example - otherwise there'd be a Profile.Save() below the set property).


I can't use Cookieless session states as the CMS I'm using won't allow it. I've also used Fiddler to try and track the issue, but no joy.

I'm guessing it's related to the way FF and SF handle cookies - but both are set to accept anything. Could it possibly be anything to do with the ASP.Net Development Server? (ie. the address is[URL]The fact that it never manages to save the value

View 1 Replies

Web Forms :: Create A Profile In Which The User Can Create And Edit His Profile?

Jun 25, 2010

I got the followig task.Create a website (Profile.aspx) in which the User can create and edit his profile.Well, I know how to write in a database, but how do I get the UserName oder the UserID to make a PrimaryKey?If the user is logged in a session will be started. In this session is the UserName but I don't know how to read out the UserName with ASP.NET to make an PrimaryKey. If I would try to read out the UserName with C# I must save it in an variable and give it somehow to my form.

asp:sqldatasource id="SqlDataSource1" runat="server"
ConnectionStrings:MyConnectionString %>"[code]....

View 4 Replies

Security :: Use The Profile Other Than Default?

Mar 3, 2010

I'm making another attempt to find out how to use a different profile in the web application. I though it would be quite simple. but couldn't find an answer anywhere.

All I need to know is how to call "i90ProfileProvider" instead of default "i90PartnerProfileProvider" in C# or VB.

<profile defaultProvider="i90PartnerProfileProvider">
<add name="i90PartnerProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="i90Partner"/>
<add name="i90ProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="i90"/>

There must be the way to do this. For user it works just fine:

MembershipUser user=


If there is a way to add a name for Profile Provider in web.config, then there must be a way to use it.

Or I should do something entirely different to retrieve the user profile form another database?

View 5 Replies

Security :: Profile And CreatUserWizard?

Mar 7, 2010

1. i use the profile feature and i noticed that the profile cant work with anonymus users . and i can understand why now it leads me to a nother problem , in the creatUserWizard i added another step wich take the personal details of the user like firstName LastName and ect... and i wanted to store the details in the profile feature...

but it wont pass me to the second step it just give me an erorr that the service can work with anonymus or something like that .

2. i stored a datetime detail in the profile and when i tried to get it it gave me the date + the hour i put the date like : 29/12/1989 18:18:00 and i want to see just the date ...

View 4 Replies

Security :: Caching Profile Object?

Dec 16, 2010

I have an MVC Web App project. Because the Profile object is only available to website apps, I've written my own Profile class that inherits from ProfileBase (as described in various places around the web). I'm also using the AppFabric cache. I would like to cache the logged in user's Profile object so that every time I access the Profile, it comes from the cache and not the aspnet database tables. However, I've hit a problem. When I try to add the Profile to the AppFabric cache, I get this error: The use of type 'System.Configuration.SettingsContext' as a get-only collection is not supported with NetDataContractSerializer. Consider marking the type with the CollectionDataContractAttribute attribute or the SerializableAttribute attribute or adding a setter to the property. I've noticed that ProfileBase inherits from SettingsBase, which indeed contains a read-only property called "Context" of type SettingsContext. I've tried for a few hours now to get my Profile:ProfileBase to serialize, but to no avail.

View 2 Replies

Security :: Get Users By Profile Information?

Oct 19, 2010

I am useing membership to store my users and under each users profile there is a field for their supervisor. I would like to get a list of all the users with the supervisor "Jon Doe". Is there an easy way to do this or would I just have to loop through each user and see if there supervisor = "Jon Doe" then if it is store there username in a list?

View 1 Replies

Security :: Update Profile Not Updating?

Feb 18, 2010

There is no error produced, but it does not seem to update the profile, any thoughts?


View 2 Replies

Security :: Cannot Update Profile Informations

May 18, 2010

I want to create the system of user profiles, where every member have profile information (address, phone number ...). Only administrator can update this information, member can only ask administrator for that update. What class i can use (ProfileManager provides only ProfileInfo and with ProfileInfo class I cannot update profile informations)

View 8 Replies

Security :: Profile Updating But Not Displaying?

Sep 28, 2010

I have a web app where I'm asking the new registered user to enter in their first name, last name and then a choice (radio buttons) of whether or not they are a solo artist, or a group! These 3 answers are held in the aspnet_Profile table. As part of the createuserwizard, it works. Saves like a charm. The user then has the ability to go in and edit these 3 fields at will. Upon page load, the two text fields (first name and last name) are blank, and the choice always defaults to the default. So it's not pulling my data for some odd reason. But, when I put put text in the field and press 'Update', it does actually update. So my issue seems specific to not getting the data on page load. I've built a custom UserProfile control by following 'The Beer House' starter kit and book. Here's my page load code for this custom control:


Another obsticle I have today is that none of my breakpoints are working, so I'm battling that as well. This seems very straight foward, and LOOKS correct, but no.. the txtFirstName and txtLastName aren't populated, but there is a first name and last name in the table. Even odder, in my header I have a "Hi John Doe" which concatinates the first name and last name, and this DOES display correctly in a lable. Here's that simple code:


View 2 Replies

Security :: Working With Profile Feature ?

Mar 1, 2010

i'm working in visual studio 2005 c#.i'm trying to learn about profile feature ... and it seems easy to use it but i have some questions ...i red some articles and tutorials about the profile feature but i dont understand where all the details that you store are stored ?in database ? xml file ?

i didnt try it yet but it seems logical to me that when you define properties in the web.config its creating tables in the database with the names you named the properties like : <profile

then it will creat in the database "name" and ├Ąge" fields ? is that right ? .... if yes , where is the definition of the connection with the database ?if not, how does it work ? i know that the <connectionString> in the web config connect the database that i want to use and creat it tables. for the login and creat user .does the profile use the connection string and work with the database to !?

View 5 Replies

Security :: Profile Not Saving Against User?

Nov 1, 2010

I have a website that acts as a common user details site for a few other websites. I pass a sersname to it and it gets the profile using


that part works fine. Now to commit the changes I use the above code to get the profilecommon for the user and then use oProfile.Save() to finish. This saves all the user data to my profile..doesn't matter which profile I use, it always gets saved to mine.

View 4 Replies

Security :: FormsAuthenticationTicket, Role, Profile?

Apr 27, 2010

I assume that any Role information is being stored in the FormsAuthenticationTicket in the UserData (delimited by some character).Second, I assume that any information in the Profile is not stored in memory / session anywhere, but when you do call the profile.VARIABLE, you are in fact doing a call to the DB (although it's simplified by the fact that it knows who you are when calling etc).Assuming the above is correct, I'm trying to complete a custom membership provider. As part of this each user will have a single role. So using a full blown role provider seems to be overkill. I assume that I can write the single role into the UserData in the FormsAuthenticationTicket myself?I would like to also store a number of other small bits of information in the ticket (such as a GroupId, VendorId which are seperate from the user / role). If I wanted to do this, and the role is held in the userdata, how would I identify what is a role and what is someother persistant data I need on the application?I could use Session items for these, but this might cause issues with the web-farm, plus the amount of data is very small (3 or 4, int32 values and maybe one string).Finally, items such as Address, PostCode, Contact Phone number all seem sensible items to place in the profile ( I'm using the table provider). Is the advantage here purely the ease of access? This isn't commonly used data, so if there is a round trip to the db thats not an issue really in this instance

View 4 Replies

Copyrights 2005-15, All rights reserved