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: 10/21/2005 4:26:10 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 26 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
timiscool999
Asp.Net User
Trouble moving web parts from one zone to another.10/21/2005 4:26:10 PM

0/0

Hi.  I'm sorry to post such a vague question, but I hope someone can at least tell me where to start looking to narrow down the problem I'm having.

I have code that moves a web part on a post back.  It used to work before so I'm not sure where the regression is (or if something changed in the .NET framework with the RC0 release), but I'm getting the following stack trace when I call WebPartManager.MoveWebPart():

[InvalidOperationException: Personalization is not enabled and/or modifiable. The Enabled property must be set to true, and a registered personalization provider must be selected. The current user must be granted the right to modify personalization state.]
System.Web.UI.WebControls.WebParts.WebPartPersonalization.EnsureEnabled(Boolean ensureModifiable) +145
System.Web.UI.WebControls.WebParts.WebPartManager.MoveWebPart(WebPart webPart, WebPartZoneBase zone, Int32 zoneIndex) +46
edu.depaul.cti.col.COLCoreWebControls.WebParts.COLWebPartZone.MinimizeWebPart(WebPart webPart) in C:\devroot\colweb2\ColWeb2\COLCoreWebControls\WebParts\COLWebPartZone.cs:103
edu.depaul.cti.col.COLCoreWebControls.WebParts.COLWebPartZone.RaisePostBackEvent(String eventArgument) in C:\devroot\colweb2\ColWeb2\COLCoreWebControls\WebParts\COLWebPartZone.cs:283
System.Web.UI.WebControls.WebParts.WebPartZoneBase.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921


Version Information: Microsoft .NET Framework Version:2.0.50727.26; ASP.NET Version:2.0.50727.26



I've tried manually connecting to the personalization database with an SqlConnection object using the query string that the Personalization provider is using, and I can insert records into that database with an SqlCommand object.  This would indicate to me that there aren't any problems actually connecting to the database.

When I look at the WebPartManager.Provider object in the debugger, it's set to "Shared" scope.  Now in my code I set the WebPartManager.InitialScope to "User", but somewhere it gets changed.  I don't have any code in my project where I set it to "Shared", so how would it be reverting back to "Shared"?

What else can I look for to see where this is going wrong?  What else could I be forgetting that I need to enable for web parts personalization to work?

Thanks for any help!

helenyan
Asp.Net User
Re: Trouble moving web parts from one zone to another.10/25/2005 12:04:42 AM

0/0

Is it possible that the current user is not authenticated? Are you using Forms or Windows auth? Can you check the values of Page.User.Identity.IsAuthenticated and Page.User.Identity.Name? When the current user is not authenticated, the Personalization scope will be defaulted to "Shared" and the current user does not have the permission to modify personalization state.

Hope that helps.
Helen
This posting is provided "AS IS" with no warranties, and confers no rights.
timiscool999
Asp.Net User
Re: Trouble moving web parts from one zone to another.10/25/2005 1:43:35 PM

0/0

Ahh very tricky :).  Found a subtle bug in my code.  But yes, thank you Helen, that did the trick!

Tim

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


Free Download:

Books:
Digital Photo Projects For Dummies Authors: Julie Adair King, Pages: 288, Published: 2007
The Passage: A Novel Authors: Steven A. Wilkens, Pages: 188, Published: 2000
Special Edition Using Java Server Pages and Servlets: Special Edition Authors: Mark Wutka, Pages: 754, Published: 2000

Web:
Trouble moving web parts from one zone to another. - ASP.NET Forums Trouble moving web parts from one zone to another. Last post 10-25-2005 9:43 AM by timiscool999. 2 replies. Sort Posts: ...
Building Web Parts, Part 1 | O'Reilly Media If a Web Part is moved from one Web Part zone into another, it will assume the ... you will see how to move the Web Parts from one WebPartZone into another. ...
Using Reporting Services SharePoint Web Parts in SQL Server 2000 ... Connections are a Web Part concept that simply means that data is passed from one Web Part to another. In this case, the data in question is a link to the ...
Reporting Services WebParts - Walkthrough - Bryant Likes's Blog Ok. (Me again) I've pulled back our Sharepoint to 2003, and I'm having trouble putting multiple RSReportViewer web parts one one page. ...
microsoft asp.net and tony patton and web Resources | TechRepublic Web Parts are one of the more interesting features in ASP. ... NET applications: Moving a Web application from one server to another can be time consuming, ...
Media Player Web Part: Updated - Alex Pearce's SharePoint Blog I went to install it on another web application earlier today and found his blog .... you can only run one video is each webpart - you can of course add the ...
Branding SharePoint - Part 3: Changing the look and feel of ... The sliding doors technique applies one image of a rounded corner to the far .... You can lock down some of the properties of a web part zone or web part ...
Blog - Robert Bogue [MVP] Preventing users from using the UI to manage web parts ... XP also allows files to be dragged from one WebDAV folder to another where Windows 2000 does not. ...
Creating A SharePoint Web Part Project You’ll see the Web Part in the task pane. Now comes the easy part: drag ‘n dunk your web part onto any part of the Web Part zone which is in your ...
SharePoint Forums Web Part - Home I’m just getting ready to release version 1.2 of the SharePoint Forums Web Part. One feature was the ability to control the date and time display for users. ...

Videos:
Lec 20 | MIT 3.091 Introduction to Solid State Chemistry Amorphous Solids, Glass Formation, Inorganic Glasses: Silicates View the complete course at: http://ocw.mit.edu/3-091F04 License: Creative Commons ...
(888)MOAX.ORG Microsoft Offfice Accounting Xchange 4_IT_JOURNAL.wmv (888)MOAX.ORG Microsoft Offfice Accounting Xchange 4_IT_JOURNAL.wmv - 31 min - Apr 23, 2008 USStudios - http://www.onafree.com (1 Rating) Rate: (...
Charlie Rose - Brian Ross / Syria's role in the Mid-East / YouTube co-founders Segment 1: The latest on the disrupted terrorist plot in London with Brian Ross of ABC News. Segment 2: A discussion about the role of Syria in th...
CSULB Economic Stabilization Act Panel Discussion Housing prices are crashing. Bear Stearns, Lehman Brothers, and Washington Mutual, have been acquired for pennies on the dollars. Fannie Mae and Fred...
Randy Pausch - Time Management Randy Pausch's Time Management talk with English and German subtitles by Friederike Sophie Brand (To activate the subtitles or change the language,...
Long Beach City Council Meeting Long Beach City Council Meeting
Being Opinionated in America: Maureen Dowd & Thomas Friedman New York Times columnists Maureen Dowd and Thomas Friedman in conversation with UC Berkeley professors Cynthia Gorney and Mark Danner.
Long Beach City Council Meeting Long Beach City Council Meeting




Search This Site:










making a er diagram

customer avatar

dnn 2.1.2 edit text/html error still not fixed?

a multipage form

to hide address bar, menubar while resizing a window

where to start after installing portal on local computer?

sql errors when installing modules / objectqualifier in webconfig

using replace function to hide emails

starting a login session for customers

master pages across multiple web apps

team foundation server

enter quotes into sql database

bound field in bold

help with web developer starter kit

access to module title inside the module code.

button that acts like a hyperlink

logic problem... :(

password length and min criteria

automatic submit of form

error when updating a table row - please help!!

external url

can' t use ie web controls in vs.net

trouble accessing events of user controls from main form

flash in content screen

parsing request object

safari menu control

some problem of vs2008's restyle

createuserwizard control

existence of skins

semicolons missing in default.css?

 
All Times Are GMT