Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET Requests and .NET 4.5 - Strange Behavior
    primarykey
    data
    text
    <p>We are getting some strange behavior on our site after upgrading the product to .NET 4.5. I will try to be as specific as possible but the problem is vague, so please bear with me. Also, for this scenario, work under the assumption that no best practices have been followed.</p> <p>The user is coming to a page that makes a number of jquery ajax calls, asynchronously, to a webservice. Because of the poor design/coding on this page, it can take forever to load, but it does provide a sub menu that the user needs access to. Once the page begins to load, they click one of the menu options to go to another page. Nothing too special so far. </p> <p>When we use perfmon on a box with .NET 4.0 only installed, we can see the ASP.NET Requests go up and down, as you would expect:</p> <p><img src="https://i.stack.imgur.com/j8ZNj.png" alt="Perfmon on 4.0 box"></p> <p>When we install it on a box with .NET 4.5 installed we get this: <img src="https://i.stack.imgur.com/LBE9O.png" alt="enter image description here"></p> <p>After executing the workflow I described above, the request get hung up. Not queued; they just sit there.</p> <p>After further research, we are noticing that the clicking between the two different pages is not just a simple href, but is actually using Response.Redirect(url);</p> <p><strong>Also, this is only happening when using IE. This is not an issue when using Firefox and Chrome.</strong> </p> <p>Here is what we have tried so far: </p> <ol> <li>We have contacted M$ and sent them out DebugDiag dumps. Still waiting.</li> <li>I have gone to IIS, set the site to trace failed requests, and have set up a failed request filter to give me everything. Once the site locks, I clear the logs, and then examine what comes in after the site locks. Everytime it is getting hung between the AspNetSessionDataBegin and the AspNetSessionDataEnd events.</li> <li>We do have an HttpHandler that reads/writes to the session, and disabling it does seem to fix the problem for the most part, but no explanation as to why.</li> <li>jquery's onunload handler, which should clean up and abort all remaining xmlhttp requests, appears to not be executing constantly. </li> <li>Installed this <a href="http://support.microsoft.com/kb/2759112" rel="nofollow noreferrer">patch</a>, still didn't help. </li> <li>We are currently changing the Response.Redirect(url) methods in this navigation logic to be Response.Redirect(url, false); (See above).</li> </ol> <p>Also as requested, here is the HttpHandler code:</p> <pre><code>public class KeepSessionAliveHttpHandler : IHttpHandler, IRequiresSessionState { public bool IsReusable { get { return true; } } public void ProcessRequest(HttpContext context) { if (context.Session.IsNewSession) { string redirectUrl = context.Request.Url.AbsoluteUri.Replace(context.Request.Url.AbsolutePath, VirtualPathUtility.ToAbsolute(Constant.Page_Logout)); context.Response.Clear(); context.Response.ContentType = "application/json; charset=utf-8"; context.Response.Flush(); context.Response.Write("{\"IsSessionAlive\": \"false\", \"RedirectUrl\": \"" + redirectUrl + "\"}"); } else { context.Session["KeepSessionAlive"] = TimeZoneHelper.GetCurrentUtcDateTime(); context.Response.Clear(); context.Response.ContentType = "application/json; charset=utf-8"; context.Response.Flush(); context.Response.Write("{\"IsSessionAlive\": \"true\"}"); } } } </code></pre> <p>Any suggestions on where we should look next?</p>
    singulars
    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.
 

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