Note that there are some explanatory texts on larger screens.

plurals
  1. POKeeping ASP.NET Session alive
    primarykey
    data
    text
    <p>With our current setup there is a requirement to maintain mirrored sessions between two sites, one existing ASP.NET website hosted in IIS 6.0 which is now containing the new website in an iFrame, and hosted seperately in IIS 7.5 (It's MVC3).</p> <p>Does anyone have any suggestions as how to keep the parent session in line with the child website session?</p> <p>My initial thought was to create an ActionFilter to fire a HttpWebRequest to an HTTPHandler of sorts on the parent site on the OnActionExecuting method. There has been doubts raised as to how this would keep the specific sessions inline, perhaps missing knowledge about session ID's of sorts?</p> <p>Something like:</p> <pre><code>public override void OnActionExecuting(ActionExecutingContext filterContext) { try { var request = WebRequest.Create( ConfigurationManager.AppSettings["HeartbeatURI"]); using (var webResponse = request.GetResponse()) { var response = webResponse as HttpWebResponse; if (response != null &amp;&amp; response.StatusCode == HttpStatusCode.OK) { </code></pre> <p>Does anyone have any recommendations/ advice here? Thanks!</p> <p><strong>Update:</strong></p> <p>After some helpful suggestions I will be investigating whether a solution from the browser, something like:</p> <pre><code>function setHeartbeat() { setTimeout("heartbeat()", 300000); // every 5 min } function heartbeat() { $.get( "http://soemthing:1234/heartbeathandler.ashx", null, function(data) { setHeartbeat(); }, "json" ); } </code></pre> <p>Will perform as I require.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload