CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: NewsGroup Date Entered: 2/21/2006 8:02:11 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 10 Views: 40 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
11 Items, 1 Pages 1 |< << Go >> >|
Danijel
Asp.Net User
Loading user personalization settings as Guest2/21/2006 8:02:11 PM

0/0

I need to create portal like myspaces.

If i have a list of users that can store their perosnalization settings. Now what would be the best possible way for a guest to retrive user personalization data?

Is there a Method that can retrive users personalization settings from database?

(my first post and bad english) :)

 

 

sschack
Asp.Net User
Re: Loading user personalization settings as Guest2/22/2006 2:35:44 AM

0/0

If you are looking to load Profile data for an arbitrary user, take a look at the code I posted for another question:

http://forums.asp.net/1204732/ShowPost.aspx

 


-Stefan
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Danijel
Asp.Net User
Re: Loading user personalization settings as Guest2/22/2006 8:06:57 PM

0/0

Thank you for quick reply. I tried this and it works. But I was thinking how could I retrieve profile regarding web parts (zones,webparts).

If authorized user access a page with his username all his zones and webparts are loaded. But if an unauthorized user accesses this same page he will see only webparts and zones that were added by user with saredscope (page owner-admin). This results that unauthorized user can only access one instance of page (owners). I would like to retrieve webparts and zones for custom user.

Will I need to create multiple pages and one user-owner per page and than set Scope to shared. This would work but I think it is not an elegant solution.

Hope you all understand what i ment ;)

sschack
Asp.Net User
Re: Loading user personalization settings as Guest2/23/2006 2:14:50 AM

0/0

In ASP.NET 2.0 web parts personalization only supports displaying shared scope data to anonymous users.  For shared scope data, there is always one set of shared data per page.  As a result there really isn't the concept of different user-owners per page.  Instead, if an authenticated website user has rights to enter shared scope, as well as modify state, then that user is allowed to switch each page into shared scope and make personalization changes for the shared-scope view of that page.

Are you looking to retrieve the per-user personalization data of a page even though the current user is anonymous?


-Stefan
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Danijel
Asp.Net User
Re: Loading user personalization settings as Guest2/23/2006 10:49:45 AM

0/0

sschack wrote:
Are you looking to retrieve the per-user personalization data of a page even though the current user is anonymous?

Exactly

I should create portal  like MSN MySpaces. But as I am investigating WebParts framework I think this can only be done by creating a new page for each user and  his scope set shared. (only one user per page and all of the other users are guest that can only see data that was set by page owner).


sschack
Asp.Net User
Re: Loading user personalization settings as Guest2/24/2006 7:28:32 PM

0/0

Scratched my head quite a bit on this since its a tough problem to solve with Web Parts.  I haven't tried out what I outline below - but from looking at the code I *think* it will work.

Try deriving from SqlPersonalizationProvider, and overriding the LoadPersonalizationBlobs method.  The trick here is along the lines of what you are suggesting - you need to make the personalization system think it is loading the shared scope data for a page, but instead you want to return the per-user data for a specific user.  The reason for deriving from SqlPersonalizationProvider is so you can fake out the personalization stack.

For LoadPersonlizationBlobs, you want the override to return the per-user data even though it is being asked to load shared state.  You will have to fill in a non-null value for the username parameter - the value will be the user whose personalized data you want to retrieve.  Than call base.LoadPersonalizationBlobs.  When the call returns, you should have a null value for the sharedDataBlob (assuming that no one ever set shared state for the page) and a non-null value for the userDataBlob.  Swap those values around - so that your custom provider returns the userDataBlob from the base provider in the sharedDataBlob parameter.  And the null value is instead returned in the userDataBlob parameter. 

This should have the effect of making the personalization stack think it just retrieved the shared data for the page, when in reality it now has the personalized data of the page for a specific user.


-Stefan
----------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Danijel
Asp.Net User
Re: Loading user personalization settings as Guest2/27/2006 10:07:53 PM

0/0

I really appreciate your quick answer.

I tried your trick and i tworked. I just hope this will be enough to use it with all other features that I need to implement for my degree:)

Thanks again.

ajjvn
Asp.Net User
Re: Loading user personalization settings as Guest10/4/2006 5:20:18 PM

0/0

I came up with this same idea after reading MSDN articles for hours.  I implemented it and no go.  What I hadn't done is the swap the user and shared BLOBs around.  I did that and no go.  I proceded to try all sorts of web.config and (custom) WebPartManager setting adjustments.  No go.  Aaargh!

 I'm at wits end.

 A

 

sschack:

Scratched my head quite a bit on this since its a tough problem to solve with Web Parts.  I haven't tried out what I outline below - but from looking at the code I *think* it will work.

Try deriving from SqlPersonalizationProvider, and overriding the LoadPersonalizationBlobs method.  The trick here is along the lines of what you are suggesting - you need to make the personalization system think it is loading the shared scope data for a page, but instead you want to return the per-user data for a specific user.  The reason for deriving from SqlPersonalizationProvider is so you can fake out the personalization stack.

For LoadPersonlizationBlobs, you want the override to return the per-user data even though it is being asked to load shared state.  You will have to fill in a non-null value for the username parameter - the value will be the user whose personalized data you want to retrieve.  Than call base.LoadPersonalizationBlobs.  When the call returns, you should have a null value for the sharedDataBlob (assuming that no one ever set shared state for the page) and a non-null value for the userDataBlob.  Swap those values around - so that your custom provider returns the userDataBlob from the base provider in the sharedDataBlob parameter.  And the null value is instead returned in the userDataBlob parameter. 

This should have the effect of making the personalization stack think it just retrieved the shared data for the page, when in reality it now has the personalized data of the page for a specific user.

ajjvn
Asp.Net User
Re: Loading user personalization settings as Guest10/4/2006 5:25:52 PM

0/0

I should add I can see the genned stored procedures, via Profiler, query the database with the username and path supplied.  I can also see results coming back into the (custom) SqlPersonalizationProvider's overridden LoadPersonalizationBlob via debugger.  It just does seem to be utilzed by the Pers/WebPart engine.  I think I have tried all the various settings to tweak to (shared/user, authorization, authentication, etc.).

 A

 

ajjvn
Asp.Net User
Re: Loading user personalization settings as Guest10/4/2006 5:27:19 PM

0/0

(Ugh, can't edit posts as a new member!)

Sorry, the line "It just does seem to be utilzed by the Pers/WebPart engine" should read "It just doesn't seem to be utilzed by the Pers/WebPart engines".

A

 

ajjvn
Asp.Net User
Re: Loading user personalization settings as Guest10/4/2006 7:50:19 PM

0/0

I posted the above when I awoke after being up until 5am messing with this.  After a shower and some breakfast (err lunch), it occured to me to check something.  Sure enough, that was it.  I had duped the page that the authenticated users use to create their personalized web parts pages.  The duped page would be in the non-authenticated area of the site.  I had inadvertantly changed the names of some of the web part objects so when I faked the username and path for this new page, the personalization pulled from the DB couldn't be applied to these non-existent (err, mis-named) web part objects.  :)  I should have just went to bed at 2am!

These forums look like they will be a great resource from some of the stuff I have read on other topics.

A

 

11 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Proceedings of the Perl Conference 4.0: July 17-20, 2000 Monterey, California Authors: Perl Conference 4, Perl Conference 4.0 Staff, O'Reilly, Pages: 135, Published: 2000
The Complete Idiot's Guide to Computer Basics Authors: Joe Kraynak, Pages: 423, Published: 2004
Rita Aero's Walt Disney World, Odyssey Edition, Version 1.4: The Essential Guide to Amazing Vacations Authors: Rita Aero, Aero, Pages: 288, Published: 2001
Administering Windows 2000 Authors: Patricia L. Barton, Brian Alley, Charles J. Brooks, Pages: 676, Published: 2002
Microsoft Windows XP Inside Out: Hundreds of timesaving solutions. Tips, tricks, workarounds, plus the straight scoop. Authors: Ed Bott, Carl Siechert, Craig Stinson, Pages: 1245, Published: 2001
Advances in Web Based Learning - ICWL 2007: 6th International Conference, Edinburgh, UK, August 15-17, 2007, Revised Papers Authors: Howard Leung, Pages: 654, Published: 2008

Web:
Stop XP personalized settings - NOVELL FORUMS When Zenworks starts loading, I have a system that shows the XP personalized settings ... Settings for the same user each time they log in. ...
Cutting Edge: Personalization and User Profiles in ASP.NET 2.0 Each member of the personalized data class corresponds to a piece of information specific to the current user. Loading and saving personalized data is ...
Method and apparatus for storing personalized computing device ... The software program of claim 13 including means for loading the personalized computing device settings to said external storage device at the end of a user ...
Personalized User Profile Startup Setting - Suggest A Fix PC ... Personalized User Profile Startup Setting. Options V ... have a sort of "Lite" user profile, wherein it will load fast during startup since ...
Personalization with Application Settings in Visual Basic Personalization with Application Settings in Visual Basic .... In the Load event , assign the SettingsKey for the user control with a value so as to uniquely ...
Are closed WebParts on personalized pages loaded on page request ... I’ve got a comment/question about the loading of WebParts in situations where personalization settings are persisted over time in order to ...
Implementing Personalization Personalization is the storing and loading of user-specific data and settings in an application. In the sample application, users can choose a background ...
Personalization and Policy Management Personalization Streaming. Rather than loading and unloading large amounts of ... the user rebuild their personalization settings from. scratch. ...
Server 2003 Terminal Server gets stuck at "Personalized Settings ... thingy and then a gray box titled "Personalized Settings" appears in the .... or some other process that is responsible for loading the user's profile. ...
"Setting up Personalized Settings" on login - Virtual Dr Forums ... Loadwc.exe, also known as Load WebCheck, customizes some of the settings in ... Loadwc.exe also propagates settings for user profiles. ...




Search This Site:










poplulating text field with dropdown selection

search database page

extending iidentity

publishing pages

problem with different browsers

need help with regular expression

problem upgrading a purchased module?

run on schedule

error in encryption and decryption

integrating filenet imaging system with visual studio 2005 application

randomly generated string

how to simulate treeview checkbox as radio button?

report printing in a web application

a page can have only one server-side form tag???

problem setting separatorimageurl during menuitemdatabound

irritating "local files" issue

how to set a user control as visible or not visible ?

wdp for vs2008 still doesn't allow web.config file section replacement of 'system.net'

error

301 redirect problem...

installation problem visual studio.net

menuadapter different browser rendering

trace the error

css for asp.net controls?

changepassword validation group

how you set a time out limit so that an uploaded file is deleted after a time limit?

max and min view options in modules

mainting membership credentials across subdomains

how to use variable within the label

running total

 
All Times Are GMT