URL issue when using SSL with CustomerPortal RRS feed

  • Question

  • 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: https://partner.company.com/knowledge-base?query=a I get a list of results OK. 
    If I try to click one of the results I get a URL in this format instead: http://partner.company.com:80/knowledge-base/article?id=4e671fbd-7fd8-e011-8d27-1cc1dee87acd

    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;


    http://www.oasystems.co.nz | OA Systems Ltd | CRM Solution of the Year at the Microsoft NZ 2010 Partner Awards

    Friday, February 17, 2012 10:26 AM

All replies

  • 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 www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com

    • Proposed as answer by Maria Joaquin Tuesday, April 17, 2012 4:26 PM
    Thursday, March 15, 2012 8:41 AM