Resolving incorrect configuration of UrlAgent

  • Description

    Sitecore’s UrlAgent, which helps keep sites in a warmed-up state, may not work properly and fail to request the keepalive.aspx page with the error similar to the following:

    ERROR Exception in UrlAgent (url: /sitecore/service/keepalive.aspx) 
    Exception: System.Net.WebException 
    Message: {ERROR MESSAGE}
    Source: System 
       at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) 
       at System.Net.WebClient.DownloadData(Uri address) 
       at System.Net.WebClient.DownloadData(String address) 
       at Sitecore.Web.WebUtil.ExecuteWebPage(String url, NameValueCollection headers) 
       at Sitecore.Tasks.UrlAgent.Run() 

    Based on the exception message you see in log files, choose the appropriate solution.

  • Error message:

    The following message may appear when the anonymous access to the /Website/sitecore/service folder is not allowed:

    Message: The remote server returned an error: (401) Unauthorized.


    Enable anonymous access to the /Website/sitecore/service folder by applying the steps described in the following article:

    Alternatively, move the /Website/sitecore/service/keepalive.aspx file to a separate location and appropriately modify the value of the url parameter of the keep-alive agent configuration in web.config:

    <agent type="Sitecore.Tasks.UrlAgent" method="Run" interval="00:15:00">
      <param desc="url">/sitecore/service/keepalive.aspx</param>

  • Error message:

    The following message may appear when the system cannot reach the DNS server to resolve the host name, or if the specified host name is not correct.

    Message: The remote name could not be resolved: 'hostname'


    • If you specified absolute url in the UrlAgent configuration, check that the host name is correct.
    • Verify that outbound connections are allowed by the firewall.
    • Check that the DNS server address is correct, especially if it is statically configured.
  • Error message:

    The following message may appear when the /Website/sitecore/service/keepalive.aspx page specified in the UrlAgent configuration is absent on the server.

    In Sitecore versions prior to 6.6.0 Update-4 this error may also happen if the Sitecore website is not configured to handle requests that use "localhost" as a hostname:

    Message: The remote server returned an error: (404) Not Found.


    Verify that the /Website/sitecore/service/keepalive.aspx page exists. If it does not exist, please copy it from the stock Sitecore installation.

    If you use Sitecore version prior to 6.6.0 Update-4, please see the following known issue as well:

  • Error message:

    The following message may appear when the SSL connection is required for accessing the /Website/sitecore/service folder:

    Message: The remote server returned an error: (403) Forbidden.


    In the UrlAgent configuration specify the absolute URL using the HTTPS protocol as below:

    <agent type="Sitecore.Tasks.UrlAgent" method="Run" interval="00:15:00">
      <param desc="url">https://<hostname>/sitecore/service/keepalive.aspx</param>

Applies to:

CMS 6+

December 11, 2014
December 11, 2014

Reference number:

341558, 423811


  • CMS,
  • Performance