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…
Workaround:
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