We have an azure hosted website, with two web apps on a load balancer. The scheduled publish facility works if I run the umbraco site on my local machine, but on the hosted environment, with servers / distributed calls turned on (or off) it doesn't work. Is there something relating to the environment we need to factor in to get scheduled publishes working? The version we are using is 7.2.7.
Is there anything useful in the Umbraco trace logs?
This can sometimes give a message on why it can't publish like a timeout when making the API call or wrong protocol.
I think I can shed some extra light on this one.
We use Umbraco 7.3.0.
In our logs we see:
ScheduledPublishing - Failed (at "http://localhost:80/umbraco"). -
System.Net.Http.HttpRequestException: An error occurred while sending
the request. ---> System.Net.WebException: Unable to connect to the
remote server ---> System.Net.Sockets.SocketException: An attempt was
made to access a socket in a way forbidden by its access permissions
127.0.0.1:80 at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Exception&
exception) --- End of inner exception stack trace --- at
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult
asyncResult, TransportContext& context) at
System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult
ar) --- End of inner exception stack trace --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task) at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
Umbraco.Web.Scheduling.ScheduledPublishing.
In other words, scheduled publishing is done via localhost IP address (that's why it works on your local device).
Is there a way to tell Umbraco to use the domain instead of local IP?
You need to set this in the umbracoSettings.config in the web.routing section
<!--
web.routing
@trySkipIisCustomErrors
Tries to skip IIS custom errors.
Starting with IIS 7.5, this must be set to true for Umbraco 404 pages to show. Else, IIS will take
over and render its built-in error page. See MS doc for HttpResponseBase.TrySkipIisCustomErrors.
The default value is false, for backward compatibility reasons, which means that IIS _will_ take
over, and _prevent_ Umbraco 404 pages to show.
@internalRedirectPreservesTemplate
By default as soon as we're not displaying the initial document, we reset the template set by the
finder or by the alt. template. Set this option to true to preserve the template set by the finder
or by the alt. template, in case of an internal redirect.
(false by default, and in fact should remain false unless you know what you're doing)
@disableAlternativeTemplates
By default you can add a altTemplate querystring or append a template name to the current URL which
will make Umbraco render the content on the current page with the template you requested, for example:
http://mysite.com/about-us/?altTemplate=Home and http://mysite.com/about-us/Home would render the
"About Us" page with a template with the alias Home. Setting this setting to true stops that behavior
@disableFindContentByIdPath
By default you can call any content Id in the url and show the content with that id, for example:
http://mysite.com/1092 or http://mysite.com/1092.aspx would render the content with id 1092. Setting
this setting to true stops that behavior
@umbracoApplicationUrl
The url of the Umbraco application. By default, Umbraco will figure it out from the first request.
Configure it here if you need anything specific. Needs to be a complete url with scheme and umbraco
path, eg http://mysite.com/umbraco. NOT just "mysite.com" or "mysite.com/umbraco" or "http://mysite.com".
-->
<web.routing trySkipIisCustomErrors="false" internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" disableFindContentByIdPath="false"
umbracoApplicationUrl="">
</web.routing>
Umbraco Scheduled Publish Not Working
Hi,
We have an azure hosted website, with two web apps on a load balancer. The scheduled publish facility works if I run the umbraco site on my local machine, but on the hosted environment, with servers / distributed calls turned on (or off) it doesn't work. Is there something relating to the environment we need to factor in to get scheduled publishes working? The version we are using is 7.2.7.
Thanks! :-p
Hi All,
I am having the same problem exactly. Though my site is only a standalone site running on azure.
Any help would be appreciated.
Thanks Sanjay
Hi,
Is there anything useful in the Umbraco trace logs? This can sometimes give a message on why it can't publish like a timeout when making the API call or wrong protocol.
Thanks, C
Hi Carole,
There isn't anything interesting related to this in log file so not able to get exactly why its not working. It does work on local environment.
Thanks Sanjay
I think I can shed some extra light on this one. We use Umbraco 7.3.0.
In our logs we see:
In other words, scheduled publishing is done via localhost IP address (that's why it works on your local device).
Is there a way to tell Umbraco to use the domain instead of local IP?
Imo that would help
Hi Jan,
You need to set this in the umbracoSettings.config in the web.routing section
Dave
That works!
Thank you Dave! #H5YR!
is working on a reply...