We are using Umbraco 4.7 and recently we switched over to using https and everything was running smothly. However, we ran into a problem when the notifcations went out to users. Previously the links looked similar to www.abc.com:80/umbraco... Now they were looking like www.abc.com:443/umbraco... This would come across to the web server as http://www.abc.com:443/umbrcao... and the browser would hang or timeout. I found that if in the browser I typed in https://www.abc.com:443/umbraco... everything was fine. The solution to fix this was to change souce code.
File: Umbraco.cms -> workflow -> Notification.cs
I replaced http:// with HttpContext.Current.Request.Url.Scheme + "://".
Sending Notifications Using HTTPS
We are using Umbraco 4.7 and recently we switched over to using https and everything was running smothly. However, we ran into a problem when the notifcations went out to users. Previously the links looked similar to www.abc.com:80/umbraco... Now they were looking like www.abc.com:443/umbraco... This would come across to the web server as http://www.abc.com:443/umbrcao... and the browser would hang or timeout. I found that if in the browser I typed in https://www.abc.com:443/umbraco... everything was fine. The solution to fix this was to change souce code.
File: Umbraco.cms -> workflow -> Notification.cs
I replaced http:// with HttpContext.Current.Request.Url.Scheme + "://".
private static void sendNotification
line 124 string[] subjectVars = { HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + ":" + HttpContext.Current.Request.Url.Port.ToString() + IOHelper.ResolveUrl(SystemDirectories.Umbraco), ui.Text(Action.Alias) , documentObject.Text }; string[] bodyVars = { mailingUser.Name, ui.Text(Action.Alias), documentObject.Text, performingUser.Name, HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + ":" + HttpContext.Current.Request.Url.Port.ToString() +IOHelper.ResolveUrl(SystemDirectories.Umbraco), documentObject.Id.ToString(), summary.ToString(), String.Format(HttpContext.Current.Request.Url.Scheme + "://{0}/{1}", HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + ":" + HttpContext.Current.Request.Url.Port.ToString(), /*umbraco.library.NiceUrl(documentObject.Id))*/ documentObject.Id.ToString() + ".aspx")line 166 string domain = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + ":" + HttpContext.Current.Request.Url.Port.ToString() + "/";<area alias="notifications" version="2.1"> ... <key alias="mailBody" version="2.1"> ... Go to https://%4%/actions/editContent.aspx?id=%5% to edit. ... </key> <key alias="mailBodyHtml" version="3.0"> ... <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="https://%4%/actions/publish.aspx?id=%5%"> PUBLISH </a> <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="https://%4%/actions/editContent.aspx?id=%5%"> EDIT </a> <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="https://%4%/actions/delete.aspx?id=%5%"> DELETE </a> ... </key> ... </area>is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.