Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 758227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:27:16+00:00 2026-05-14T15:27:16+00:00

we are using the asp.net profiles provider in our app and I need to

  • 0

we are using the asp.net profiles provider in our app and I need to update one particular property for most of our users. Does anyone have a console app or sample code written? We are not storing the properties in string format. This binary stream is in the aspnet_Profile table.

thanks,
hp

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:27:17+00:00Added an answer on May 14, 2026 at 3:27 pm

    You can do something like this fairly easily:

    Membership.GetAllUsers().Cast<MembershipUser>()
        .Where(u => true /*insert your criteria here*/)
        .ToList().ForEach(user =>
        {
            var p = ProfileBase.Create(user.UserName, true);
    
            // do whatever you want to the profile here
            int counter = (int)p["Counter"];
            counter++;
            p["Counter"] = counter;
    
            p.Save();
        });
    

    The above code will work as-is in any handler of your site, but if you want to do it with a console app, simply copy the <system.web> section from your web.config to the app.config of the console app.

    caveat: if you are using the default provider connection string, localSqlServer, you will need to create a new connection string explicitly pointing to the .mdf as only web applications have a concept of DATADIRECTORY (app_data).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using asp.net, I need to generate a snapshot of an youtube video. I have
Using ASP.net, how do you write ANSI characters to a text file? I need
I'm using asp.net 4.0 with asp.net MVC 2.0 and the asp.net membership provider. I
I'm currently trying to use ASP.Net Profiles to store additional user information about users
I'm using forms authentication on a very small ASP.NET web app (Web Forms) in
I am using asp.net and I need to display a prompt to the user
In asp.net (using MVC, but this happens in regular too) Profile.GetProfile(username); will update the
I'm using the ASP.NET Membership provider to handle all membership activities on my current
Users have their timezones stored in ASP.NET profiles as strings. I want to use
For my ASP.NET MVC 3 app (using Razor) my web.config has this: <profile> <providers>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.