More in this section

Forums / Developing with Sitefinity / Is there a way to shut off security trimming?

Is there a way to shut off security trimming?

10 posts, 0 answered
  1. Jon Ingersoll
    Jon Ingersoll avatar
    32 posts
    Registered:
    12 May 2009
    22 Oct 2009
    Link to this post
    We've been having performance issues with our installation of sitefinity. We've tracked it down to the sitemenu control on all of our pages. Once a use logs in and the control needs to check their roles to filter out pages they don't have access to, the page load times increase dramatically.

    From what I've been reading about the navigation, the nav controls and sitemap use security trimming to hide pages from the users that they do not have access to.  Is there a way to shut off security trimming to see if this improves out speeds?

    Our users would actually prefer this in the sense that they often cannot find the secured pages as they forget to login. We have login and no login required pages in our site.
  2. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    01 Jun 2017
    27 Oct 2009
    Link to this post
    Hello Jon Ingersoll,

    Unfortunately there is no way to shut off the security checking.
    You can try to enable page caching at least for the most common pages if you have not already done it.

    Sincerely yours,
    Nikolai
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. derek
    derek avatar
    37 posts
    Registered:
    15 Jun 2007
    27 Oct 2009
    Link to this post
    Hi Nikolai,

    We suspect the problem is related to the menu control or sitemap generation, this may or may not be directly related security trimming, but the behavior we have noticed is this:

    ~6-7 seconds are added to any page that has a menu control on it.  When we removed the menu control, the page loads immediately. This behavior is present on on dev, test and production machines.  This particular site has about 500+ pages or so.

    I have attached a screenshot showing response times to give you an example of a typical page.  This particular page, has a welcome control (that simulates the sharepoint style identity), a menucontrol, search, and a generic content.  We can remove everything and leave the menu control, and we still get the slow down.  If we remove the menu control, the page responds instantly.

    The viewstate on these pages is enormous as well, however, shutting viewstate off entirely still shows the 6-7 second lag on every page.

    Any help on where to look, or how we can track this bug down would be appreciated.
  4. derek
    derek avatar
    37 posts
    Registered:
    15 Jun 2007
    27 Oct 2009
    Link to this post
    Ok, digging a bit deeper. It really does look like a sitemap generation issue (perhaps with security trimming), or just a general performance of the menu with many items in it. I wouldn't think that the number of items in the menu would cause that significant of a delay/wait state, however, I could be wrong.

    Our menu has a section for Student Organizations. Under these student organizations, are several other nested pages (You can see the example posted below).

    Is it possible to generate a static sitemap? Is there a way for us to cache the sitemap? or improve the overall generation performance?  Would bypassing the sitefinity menu and using a radmenu while manually pointing it at a SitemapDataSource1 improve the performance? 

    Thanks,

    - Derek

    This is a section that is causing significant delay:
    COMMUNITY Tools
    • My Projects
    • Student Organizations Center
      • Clubs
        • Arts and Culture
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
        • Biotechnology and Pharmaceuticals
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
        • Black Business Alliance
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
          • Announcements
            • Manage Announcements
            • Create Announcements
            • View Announcements
        • Business and the Environment
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
        • Canadian
          • Announcements
            • Manage Announcements
            • Create Announcements
            • View Announcements
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
        • Christian Fellowship
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
          • Announcements
            • Create Announcements
            • View Announcements
            • Manage Announcements
        • Community Service
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
          • Gallery
            • View Images
            • Upload Images
            • Manage Images
        • Conservative
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
        • Consulting
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
        • Democrats
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
          • Gallery
            • View Images
            • Manage Images
            • Upload Images
        • Economic Development
          • Announcements
            • Create Announcements
            • View Announcements
            • Manage Announcements
          • Gallery
            • View Images
            • Manage Images
            • Upload Images
        • Education
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
        • Energy
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • Create Announcements
            • View Announcements
            • Manage Announcements
        • Entrepreneurship
          • Gallery
            • Manage Images
            • View Images
            • Upload Images
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
        • European
          • Gallery
            • View Images
            • Upload Images
            • Manage Images
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
        • Finance
          • Gallery
            • Manage Images
            • View Images
            • Upload Images
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
        • Q plus Gay Straight Alliance
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
          • Announcements
            • View Announcements
            • Manage Announcements
            • Create Announcements
        • Retail
          • Gallery
            • View Images
            • Manage Images
            • Upload Images
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
        • Internship Fund
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
        • Korea
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
          • Announcements
            • Manage Announcements
            • Create Announcements
            • View Announcements
        • SOM United Soccer
          • Gallery
            • Manage Images
            • View Images
            • Upload Images
          • Announcements
            • View Announcements
            • Manage Announcements
            • Create Announcements
        • Hockey
          • Gallery
            • Manage Images
            • View Images
            • Upload Images
          • Announcements
            • Create Announcements
            • View Announcements
            • Manage Announcements
        • Global Social Enterprise
          • Announcements
            • Manage Announcements
            • Create Announcements
            • View Announcements
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
        • Sports
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
        • Food For Thought
          • Gallery
            • View Images
            • Manage Images
            • Upload Images
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
        • Graduate and Professional Student Senate
          • Announcements
            • Manage Announcements
            • Create Announcements
            • View Announcements
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
        • Partners
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
        • Media and Entertainment
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
        • Technology
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
          • Announcements
            • View Announcements
            • Manage Announcements
            • Create Announcements
        • Operations
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
        • Marketing
          • Gallery
            • View Images
            • Upload Images
            • Manage Images
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
        • Real Estate
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
        • Private Equity
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
        • Women In Management
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
          • Announcements
            • View Announcements
            • Manage Announcements
            • Create Announcements
        • South Asian Business Forum
          • Announcements
            • Create Announcements
            • View Announcements
            • Manage Announcements
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
        • SOM Outreach
          • Gallery
            • View Images
            • Upload Images
            • Manage Images
          • Announcements
            • Manage Announcements
            • View Announcements
            • Create Announcements
        • International
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
        • Board Service
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
          • Gallery
            • Manage Images
            • View Images
            • Upload Images
        • Sales and Trading
          • Gallery
            • View Images
            • Upload Images
            • Manage Images
          • Announcements
            • Manage Announcements
            • Create Announcements
            • View Announcements
        • Our SOM
          • Gallery
            • View Images
            • Manage Images
            • Upload Images
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
        • Investment Management
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
          • Gallery
            • View Images
            • Upload Images
            • Manage Images
        • Veterans
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
        • Food and Wine
          • Gallery
            • Manage Images
            • View Images
            • Upload Images
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
        • Net Impact
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
        • Jewish Students Association
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
        • Japan
          • Announcements
            • Manage Announcements
            • Create Announcements
            • View Announcements
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
        • Greater China
          • Announcements
            • View Announcements
            • Manage Announcements
            • Create Announcements
          • Gallery
            • Upload Images
            • View Images
            • Manage Images
        • SOM Crew
          • Gallery
            • View Images
            • Manage Images
            • Upload Images
          • Announcements
            • View Announcements
            • Create Announcements
            • Manage Announcements
        • Ski and Snowboard
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
          • Gallery
            • View Images
            • Upload Images
            • Manage Images
        • Squash
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • View Announcements
            • Manage Announcements
            • Create Announcements
        • Public Speaking
          • Announcements
            • Create Announcements
            • View Announcements
            • Manage Announcements
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
        • Healthcare
          • Gallery
            • Upload Images
            • Manage Images
            • View Images
          • Announcements
            • Create Announcements
            • Manage Announcements
            • View Announcements
        • Yearbook
          • Gallery
            • Manage Images
            • Upload Images
            • View Images
          • Announcements
            • Create Announcements
            • View Announcements
            • Manage Announcements

  5. Pik Lee
    Pik Lee avatar
    142 posts
    Registered:
    13 Aug 2012
    29 Oct 2009
    Link to this post
    I am having the same issue. I am using site tabstrip for my navigation. Do you have a solution to speed up the performance?

    Thanks,
    Pik
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    29 Oct 2009
    Link to this post
    Hi derek,

    Thank you for getting back to us with more information.

    Well the from the situation that you are describing I get the impression that the menu is loading slowly because your site map contains a considerable number of pages. The problem is that the Site Menu is a RadMenu wrapped in a user control bound to a sitemap data source.  This data source loads all relevant site map nodes during the databinding process. This rules your suggestion with trying to use RadMenu.

    I am looking at several options for trying to improve performance:

    1) Enable caching for pages
    2) Disable the view state of the site menu control.

    If those two do not help we should look at a different approach for loading the items of the site menu:

    3) Load on demand through wcf web service. I have prepared a small sample how to do this with our SiteMap. My approach is the following. Bind the menu to a site map data source, however just bind the first level of items on page load. Then use the wcf web service to load children items on demand, and their children Items too. I have attached the user control and web service to this post. You should add the web service data to your web.config and add RadAjaxManager to your master page:
    web.config:
    <system.serviceModel>
      <behaviors>
       <endpointBehaviors>
        <behavior name="ServiceAspNetAjaxBehavior">
         <enableWebScript />
        </behavior>
       </endpointBehaviors>
      </behaviors>
      <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      <services>
       <service name="Service">
        <endpoint address="" behaviorConfiguration="ServiceAspNetAjaxBehavior"
         binding="webHttpBinding" contract="Service" />
       </service>
      </services>
     </system.serviceModel>

    Note that I have hard coded part of the child items paths, you should replace my string with one relevant for your site (~/App_Code/Service.cs):

    else newItem.NavigateUrl = "http://localhost:7401/Blankk37SP1/en" + page.DefaultUrl.Url.Substring(1);

    Note that this is only sample code if you decide to use it you should extend it to fully meet your requirements. You should enable .svc support for IIS.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Pik Lee
    Pik Lee avatar
    142 posts
    Registered:
    13 Aug 2012
    29 Oct 2009
    Link to this post
    Could you please tell me where can I place the web service data in the web.config file? And how do I add RadAjaxManager in master page. Could you please provide some example.

    Thanks,
    Pik
  8. derek
    derek avatar
    37 posts
    Registered:
    15 Jun 2007
    29 Oct 2009
    Link to this post
    Pik,

    I temporarily solved the problem by limiting the depth of the menu with the MaxDataBindDepth setting.

    You can get to this location by editing the control
    Misc -> Menu (then click edit) -> Data -> MaxDataBindDepth

    The default value is -1 (which doesn't limit), I set this to 3 and 4 for a massive increase in performance.  We will look into the suggestion above as well, but setting the MaxDataBindDepth has allowed us to continue with our development for now.

    thanks,

    - derek
  9. Pik Lee
    Pik Lee avatar
    142 posts
    Registered:
    13 Aug 2012
    29 Oct 2009
    Link to this post

    I have my site menu as below. I want the menu shows in Page1 and subpages below. Those pages are assigned permission and SSL pages.


    PageA

    PageB

       -Page1

          -Page1A

          -Page1B

       -Page2

          -Page2A

          -Page2B


    For the string in NavigationUrl, do I place https://www.url.com/Page1? or ~/Page1/...


    else newItem.NavigateUrl = "http://localhost:7401/Blankk37SP1/en" + page.DefaultUrl.Url.Substring(1);

    Thanks,

    Pik

  10. Pik Lee
    Pik Lee avatar
    142 posts
    Registered:
    13 Aug 2012
    29 Oct 2009
    Link to this post
    Hi Derek,

    Thank you for the info. I tried that and the time to render the page is about 3 to 4 sec. Lets me know if you find any other solution. I am going to test on the suggestion provided by Radoslav.

    Thanks,
    Pik
Register for webinar
10 posts, 0 answered