Killer Keepalive.aspx while debugging your sitecore application.

Problem:

Ever seen below message on debugger while debugging you sitecore application!!!.if so please read on which can make your life easier while debugging.

pasted-image-at-2016_09_09-12_50-pm

Here you are seeing  another thread  which is a request for Keepalive.aspx to prevent application pool timeouts.(See below references to read more on this).

Solution:

Step 1: Disable the URL agent by updating the interval to 00:00:00 as below:

<!– Agent to retrieve a URL –>
<agent type=”Sitecore.Tasks.UrlAgent” method=”Run” interval=”00:00:00″>
<param desc=”url”>/sitecore/service/keepalive.aspx</param>
<LogActivity>true</LogActivity>
</agent>

Step 2:

Comment out the following function in Sitecore.js at “\Website\sitecore\shell\Controls\Sitecore.js” as below:

// function scKeepAlive() {
// var img = document.getElementById(“scKeepAlive”);

// if (img == null) {
// img = document.createElement(“img”);

// img.id = “scKeepAlive”;
// img.width = “1”;
// img.height = “1”;
// img.alt = “”;
// img.style.position = “absolute”;
// img.style.display = “none”; /* if set to “”, causes scrollbars in firefox */

// document.body.appendChild(img);
// }

// img.src = “/sitecore/service/keepalive.aspx?ts=” + Math.round(Math.random() * 12361814);
// }

Please make sure you reverted the changes back after debugging, because this function is used to avoid session expiration that will lead to lost update, for example during long RTE editing.

Note : Sitecore version used to test above code is Sitecore 7.2

References :
keeping-sitecore-alive.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s