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
You can do something like this fairly easily:
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 yourweb.configto theapp.configof 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 ofDATADIRECTORY(app_data).