Hi Everyone, I've got a Umbraco sire (7.5.3) on a Azure WebApp that keeps giving me this error, I've had a look around but can't seem to find a way to fix it.
I've activated Web Sockets in my app etc... but this hasn't helped.
This is the error:
2017-06-26 12:07:49,479 [P3448/D2/T87] ERROR Umbraco.Web.Scheduling.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 your /config/umbracosettings.config file have you got an UmbracoApplicationUrl set? (it's write at the bottom of config file as an attribute on the routing element)
yes, setting up scheduled publishing correctly has a lot of hoops to jump through depending on the hosting environment, and a number of configuration factors.
Essentially Umbraco is making a request to itself to an endpoint every so often to see if there is anything to publish, so if for any reason it can't successfully make that request you get an error like you see above.
How Umbraco determines the Url depends on whether your are load balancing etc, but first it will look for this umbracoApplicationUrl setting, if it's blank it will look for a 'baseUrl' setting on the scheduledTasks options in the same umbracoSettings config file, and if this is not set, it looks at the list of distributedCall Servers in the same config file and if nothing is set, the first request Umbraco receives is used as this Url!
If you are running the site over https, then the umbracoApplicationUrl needs to include the https bit in the url eg: https:\yoursite.com/umbraco AND umbracoUseSSL must be set to true in the web.config appsettings.
So yes set the umbracoApplicationUrl to be your site and see if that makes the errors disappear!
Other reasons why the request might fail include 'url rewriting' of all requests to the /umbraco folder that some people put in place for security purposes - or problems with DNS eg the server doesn't have access to a DNS server to be able to make a request to itself.
Error with Scheduled Publishing on a Azure WebApp
Hi Everyone, I've got a Umbraco sire (7.5.3) on a Azure WebApp that keeps giving me this error, I've had a look around but can't seem to find a way to fix it.
I've activated Web Sockets in my app etc... but this hasn't helped.
This is the error:
2017-06-26 12:07:49,479 [P3448/D2/T87] ERROR Umbraco.Web.Scheduling.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.
Thanks
Hi Scott
In your /config/umbracosettings.config file have you got an UmbracoApplicationUrl set? (it's write at the bottom of config file as an attribute on the routing element)
perhaps to http://localhost:80 ?
if so then your webapp, is using that as the baseurl for scheduled publishing...
regards
Marc
Hi Marc,
Thanks for your reply.
I've checked the UmbracoApplicationUrl and it's set to "".
shall I try changing it to my live domain?
Thanks
Hi Scott
yes, setting up scheduled publishing correctly has a lot of hoops to jump through depending on the hosting environment, and a number of configuration factors.
Essentially Umbraco is making a request to itself to an endpoint every so often to see if there is anything to publish, so if for any reason it can't successfully make that request you get an error like you see above.
How Umbraco determines the Url depends on whether your are load balancing etc, but first it will look for this umbracoApplicationUrl setting, if it's blank it will look for a 'baseUrl' setting on the scheduledTasks options in the same umbracoSettings config file, and if this is not set, it looks at the list of distributedCall Servers in the same config file and if nothing is set, the first request Umbraco receives is used as this Url!
If you are running the site over https, then the umbracoApplicationUrl needs to include the https bit in the url eg: https:\yoursite.com/umbraco AND umbracoUseSSL must be set to true in the web.config appsettings.
So yes set the umbracoApplicationUrl to be your site and see if that makes the errors disappear!
Other reasons why the request might fail include 'url rewriting' of all requests to the /umbraco folder that some people put in place for security purposes - or problems with DNS eg the server doesn't have access to a DNS server to be able to make a request to itself.
regards
Marc
Hi Marc,
Sorry about the late reply.
Thanks for your help, I've changed the umbracoApplicationUrl to the site. I'll let you know if it works.
Thanks
Hi Scott, Did this change work for you?
/Nick
is working on a reply...