+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / External Link to Sharepoint Calendar causes SiteFinity hang

External Link to Sharepoint Calendar causes SiteFinity hang

10 posts, 0 answered
  1. ViNull
    ViNull avatar
    5 posts
    Registered:
    10 Feb 2009
    10 Aug 2009
    Link to this post
    New SiteFinity 3.6 Community Installed on a Windows 2008 server, running in full trust.

    If we add a link to an external site that is a share point calendar, SiteFinity will hang and requires stopping IIS, clearing the Temporary ASP.NET folder, and restarting.  Then we must remove the link, and sometime stop IIS and clear the Temp ASP.NET folder again before the site returns to normal.  We have other external links added to the sitemap that don't cause any issues.

    The link (internal company link only) causing issue: http://sharepoint.jewelry.acn/sites/LD/Lists/Learning%20Calendar/calendar.aspx

    No log of the errors in the Event Log

    Mike
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    13 Aug 2009
    Link to this post
    Hi Michael,

    Thank you for contacting us.

    We have tried to reproduce the problem, but was not able to. Nothing happens when I create an external page with such URL, perhaps because the url is internal for your organization only. 
    I am not sure why you experience such problem - the external page url is opening in an iframe inside of the administration. What happens if you load the url in a browser window?

    Can you please check if you can create an external page, located in different position in the sitemap? I don't believe this could cause a problem but still, we could try that. 

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  3. ViNull
    ViNull avatar
    5 posts
    Registered:
    10 Feb 2009
    17 Aug 2009
    Link to this post
    I've tried linking the external page in multiple spots, same error (server hangs, requires restart and clearing of temp folder).  I've also tried linking to any page in sharepoint (not just the calendar) and get the same error.  I also get the same error with other sharepoint sites, including http://heartland.usergrouphosting.com/Lists/Events/calendar.aspx which is public, so you should be able to test.  It has something to do with a custom nav control - pasted below - though the control works for other non-sharepoint external links.

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyJTV-Sub-Nav.ascx.cs" Inherits="MyJTV_Sub_Nav" %> 
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" /> 
    <ul id="sidebarnav"
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SiteMapDataSource1"
            <ItemTemplate> 
                <li><asp:HyperLink ID="hlMenu" runat="server" NavigateUrl='<%# Eval("Url") %>'  
                                   Text='<%# Eval("Title") %>' CssClass='<%# GetCssClass(Eval("Url")) %>' /></li
            </ItemTemplate> 
        </asp:Repeater> 
    </ul> 
     
    using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Web; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
     
    public partial class MyJTV_Sub_Nav : System.Web.UI.UserControl { 
        protected void Page_Load(object sender, EventArgs e) { 
            try { 
                foreach (SiteMapNode node in SiteMap.Provider.RootNode.ChildNodes) { 
                    if (SiteMap.CurrentNode.IsDescendantOf(node) || node.Equals(SiteMap.CurrentNode)) 
                        SiteMapDataSource1.StartingNodeUrl = node.Url; 
                } 
            } 
            catch { } 
        } 
        protected String GetCssClass(object url) { 
            String cssClass = ""
            try { 
                SiteMapNode node = SiteMap.Provider.FindSiteMapNode(url.ToString()); 
                if (node != null && (node.Equals(SiteMap.CurrentNode) || SiteMap.CurrentNode.IsDescendantOf(node))) 
                    cssClass = "active"
            } 
            catch { } 
     
            return cssClass; 
        } 
     

  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    18 Aug 2009
    Link to this post
    Hi Michael,

    I have tried this with Sitefinity 3.6SP2, and 3.7 but did not face the problem. Please take a look at the attached screenshot. Once again, everything that Sitefinity does with the external page, is to create an Iframe with src set to the url.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  5. ViNull
    ViNull avatar
    5 posts
    Registered:
    10 Feb 2009
    18 Aug 2009
    Link to this post
    The page loads okay in the iframe after adding, it's the next click to another page that causes the problem.  I can consistently reproduce the problem, and it only occurs if the custom control I pasted above is on the master page and the external site is sharepoint.
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    20 Aug 2009
    Link to this post
    Hello Michael,

    I think that we are missing something. Here is what I did:

    1. Created an external page, and pointed it to the shared calendar
    2. Created a new page, containing the control you mentioned. 

    3. Now, I visit the external page from the Sitemap. I see the calendar correctly. 
    4. I visit the page with the control - everything is fine again. 

    Do you have a live url where we can see the problem? Am I missing a step?

    Thank you for your cooperation in advance. 

    Greetings,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  7. ViNull
    ViNull avatar
    5 posts
    Registered:
    10 Feb 2009
    20 Aug 2009
    Link to this post
    Hi Georgi,

    Thank you for you patience with me ;)

    The (custom) control is on a master page / template that all the pages in the site use.  I think that's the only difference from your steps.  If the control is present on the template when adding the external page linking to SharePoint, the page will load after adding, but will hang on the next click.  If the control is not present, all is fine.

    I'm going to try and record a screen cast of the issue - will post back a link.  I wish I had a public link I could give you - I'm emailing the IT guys to see if that can be an option.

    Thanks,
    Mike
  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    25 Aug 2009
    Link to this post
    Hello Michael,

    I reproduced the error - it happens when your external page is a parent page of another one, having the  control you mentioned.

    The actual error is the following:
    Could not find the sitemap node with URL 'http://heartland.usergrouphosting.com/Lists/Events/calendar.aspx ' 

    Here's the stack trace:
    [ArgumentException: Could not find the sitemap node with URL 'http://heartland.usergrouphosting.com/Lists/Events/calendar.aspx '.] 
       System.Web.UI.WebControls.SiteMapDataSource.GetNodes() +1206534 
       System.Web.UI.WebControls.SiteMapDataSource.GetPathNodeCollection(String viewPath) +38 
       System.Web.UI.WebControls.SiteMapDataSource.GetView(String viewName) +40 
       System.Web.UI.WebControls.SiteMapDataSource.System.Web.UI.IDataSource.GetView(String viewName) +10 
       System.Web.UI.WebControls.Repeater.ConnectToDataSourceView() +253 
       System.Web.UI.WebControls.Repeater.OnLoad(EventArgs e) +19 
       System.Web.UI.Control.LoadRecursive() +50 
       System.Web.UI.Control.LoadRecursive() +141 
       System.Web.UI.Control.LoadRecursive() +141 
       System.Web.UI.Control.LoadRecursive() +141 
       System.Web.UI.Control.LoadRecursive() +141 
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 

    In other words, your Sitemap cannot start from a URL which is not presented in the current Sitemap, but this is what your control is trying to do. 

    Here's a quick fix to the control:
     protected void Page_Load(object sender, EventArgs e) 
        { 
            //try 
            //{ 
                foreach (SiteMapNode node in SiteMap.Provider.RootNode.ChildNodes) 
                { 
                    if (SiteMap.CurrentNode.IsDescendantOf(node) || node.Equals(SiteMap.CurrentNode)) 
                    { 
     
                        Telerik.Cms.Web.CmsSiteMapNode siteNode = (Telerik.Cms.Web.CmsSiteMapNode)node; 
                        if (siteNode.CmsPage.PageType == Telerik.Cms.CmsPageType.Normal) 
                        { 
                            SiteMapDataSource1.StartingNodeUrl = node.Url; 
                        } 
                        else 
                        { 
                            //decide what to do with the starting node. If you leave it that way 
                            //you will see the whole sitemap. 
                        } 
     
                    } 
                     
                } 
            //} 
            //catch { 
                 
            //} 
        } 

    In short, we are checking if the current node is external page, and prevent setting an external URL for a starting node for the current site Sitemap.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  9. ViNull
    ViNull avatar
    5 posts
    Registered:
    10 Feb 2009
    25 Aug 2009
    Link to this post
    I've tried the change, but have the same result.

    The problem doesn't result in an exception - the site fails to compile correctly under IIS, and I have to clean out the bad compile from the asp.net temp folder to get things running again.  (I normally have the try/catch uncommented, which would handle the exception).  The foreach is only walking the first level (RootNode.ChildNodes), none of which are external.   I only have the problem with an external link to a Sharepoint site - we have external links to other sites at the same level, under the same node, that don't cause a problem ( "http://jtv.com/", "http://jtvlearning.howtomaster.com/", "http://finapp01.acntv.com:8006/", and "http://intranet.acntv.com/show.schedule/schedule.asp" ).

    I'm currently working around the issue with a simple user control on a page to redirect to the sharepoint calendar:

        protected void Page_Load(object sender, EventArgs e) { 
            if (!Request.Url.OriginalString.Contains("cmspagemode=edit")) 
                Response.Redirect(@"http://sharepoint.jewelry.acn/sites/LD/Lists/Learning%20Calendar/calendar.aspx", true); 
        } 
     

    I know it's something to do with my nav control because if I remove it, it works.  I'm okay with the bounce page, but when I have more time I'll dig deeper and if I find something I'll update here.  Georgi you've been excellent help!

    Mike
  10. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    28 Aug 2009
    Link to this post
    Hi Michael,

    Thank you for letting me know on your progress. I will spent some more time on the issue as well, and will follow up if I find something else. 
    It is great to know that you have a backup plan :). Good luck with the rest of the project!

    Regards,
    Georgi
    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.
Register for webinar
10 posts, 0 answered