Minimize/Close button

Rate It (1)

Last post 09-02-2005 3:39 PM by helenyan. 6 replies.

Sort Posts:

  • Minimize/Close button

    08-12-2005, 11:27 AM
    • Contributor
      4,773 point Contributor
    • yaip
    • Member since 10-27-2003, 2:29 PM
    • Los Angeles, CA
    • Posts 1,145
    I've got a web page. On this page, I drag a Web Part Manager. I then drag a Web Part Zone. I drag a Calendar control on this zone. In the design mode I see a minimize/close buttom but when I run the page I don't see it.

    What am I doing wrong?


    Thanks
    I love computers because: MY WISH IS THEIR COMMAND :)

    <Website>
    <Gadget>
  • Re: Minimize/Close button

    08-12-2005, 11:57 AM
    • Participant
      880 point Participant
    • JoeBerg
    • Member since 08-20-2004, 1:08 PM
    • Redmond
    • Posts 176
    This is probably because you are not authenticated when browsing to the page. The personalization works with authenticated users; you can use whether FormsAuthentication or WindowsAuth. The simplest way would be to use Windows- please go in IIS (inetmgr) and look for your Virtual Directory and right-click on it. Then select "Properties", "Directory Security", "Edit..." in the Authentication section and uncheck the "Enable Anonymous Access" (make sure that "Integrated Windows Authentication" is turned on). Also please double-check that the Authentication mode in web.config is set to "Windows" (this should be the default).

    Thanks,
    Joe
  • Re: Minimize/Close button

    08-12-2005, 12:08 PM
    • Contributor
      4,773 point Contributor
    • yaip
    • Member since 10-27-2003, 2:29 PM
    • Los Angeles, CA
    • Posts 1,145
    That was it! Thanks.
    Thanks
    I love computers because: MY WISH IS THEIR COMMAND :)

    <Website>
    <Gadget>
  • Re: Minimize/Close button

    08-12-2005, 12:32 PM
    • Contributor
      4,773 point Contributor
    • yaip
    • Member since 10-27-2003, 2:29 PM
    • Los Angeles, CA
    • Posts 1,145
    Now I have another issue. I closed (not minimized) a zone. Now when I run the page, I don't know how to bring it back.
    Thanks
    I love computers because: MY WISH IS THEIR COMMAND :)

    <Website>
    <Gadget>
  • Re: Minimize/Close button

    08-12-2005, 5:28 PM
    • Participant
      880 point Participant
    • JoeBerg
    • Member since 08-20-2004, 1:08 PM
    • Redmond
    • Posts 176
    You should use the PageCatalogPart inside a CatalogZone. You would also need to change the WebPartManager's DisplayMode to "Catalog". Please see the QuickStarts for more information:

    http://beta.asp.net/QUICKSTART/aspnet/doc/webparts/default.aspx

    Thanks,
    Joe
  • Re: Minimize/Close button

    09-02-2005, 2:25 PM
    • Member
      5 point Member
    • boeningj
    • Member since 09-02-2005, 6:19 PM
    • Posts 1

    What if you are not using Windows authentication?  I am using Forms authentication and am having the same problem.  I get the following error after I login as a valid user created in my ASPNETDB.MDF:

    The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user.
    Parameter name: value

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: The specified display mode is currently disabled on this page. Make sure personalization is enabled for the current user.
    Parameter name: value

    Source Error:

    Line 25:                 break;
    Line 26:             case "Design":
    Line 27:                 this.webMan.DisplayMode = WebPartManager.DesignDisplayMode;
    Line 28:                 break;
    Line 29:         } // End switch

    I assume that this is an authentication issue.

  • Re: Minimize/Close button

    09-02-2005, 3:39 PM
    • Member
      115 point Member
    • helenyan
    • Member since 07-06-2004, 1:50 PM
    • Posts 23

    This should work the same way for forms authentication: by default, all authenticated users have the "modifyState" capability. This means that as long as you are authenticated, you should be able to switch to design display mode. One way to check that you are authenticated is by checking Page.User.Identity.IsAuthenticated.

    If you override the default web.config with your own authorization rules in the <webParts><personalization> section, you should grant the desired user the "modifyState" capability. An example is shown below. You can programmatically check if the currently logged-on user has this capability through the wpmInstance.Personalization.IsModifiable property getter.

    <webParts>
       <
    personalization>
          <
    authorization>
             <
    allow users="MyUser" verbs="modifyState"/>
             <
    deny users="*" verbs="modifyState"/>
          </
    authorization>
       </
    personalization>
    </
    webParts>

    Hope that helps.

    Helen

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (7 items)