URL issue when using SSL with CustomerPortal


  • I have the Customer Portal (downloaded prior to November 2011) deployed for a client and we’ve just enabled SSL.  Now we’re having problems browsing to KB articles returned in the results as the URLs do not appear to be generated correctly.

    If I browse the knowledgebase at this URL: I get a list of results OK. 
    If I try to click one of the results I get a URL in this format instead:

    The :80 at the end of the URL is obviously the issue… if I remove it manually, then the page loads ok.
    Is there something I didn’t configure correctly in the CustomerPortal?

    I’ve fixed it in this instance, but I’d like to know if it was something I set up wrong so I can roll back my fix and set it up correctly…

    I hacked the code in the PortalPage.cs file:

    protected UrlBuilder GetUrlForRequiredSiteMarker(string siteMarkerName)
                         var page = ServiceContext.GetPageBySiteMarkerName(Website, siteMarkerName);

                         if (page == null)
                               throw new Exception("Please contact your System Administrator. Required Site Marker '{0}' is missing.".FormatWith(siteMarkerName));

                         var path = ServiceContext.GetUrl(page);

                         if (path == null)
                               throw new Exception("Please contact your System Administrator. Unable to build URL for Site Marker '{0}'.".FormatWith(siteMarkerName));

                //hacked the following to return a valid url when using HTTPS
                //return new UrlBuilder(path);
                var url = new UrlBuilder(Request.UrlReferrer.Scheme, Request.UrlReferrer.Host, Request.UrlReferrer.Port, path);
                return url;

                  } | OA Systems Ltd | CRM Solution of the Year at the Microsoft NZ 2010 Partner Awards

    יום שישי 17 פברואר 2012 10:26

כל התגובות

  • That appears to be an appropriate fix for the problem.  I will let my developers know about this so that they can fix the portal code for the next drop.

    Shan McArthur Check out the commercial edition of xRM portals @

    יום חמישי 15 מרץ 2012 08:41
    מנחה דיון