Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET Page is constantly reloading in Visual Studio 2012
    primarykey
    data
    text
    <p>I've been doing some searches and have come up empty. When I search for the phrase, I usually end up getting people asking how to make a page constantly reload. I'm having the opposite problem.</p> <p>The situation: I have two functionally identical sets of code ("testing" branch and "production" branch - merged to be identical only a week ago) running on either IIS Express or ASP.NET Dev Server. The only difference is the database they're calling (and I even set that back so they were calling the same database). Of course we've made a few changes here and there for debugging purposes, but not to where the code functions any differently.</p> <p>The problem: We have one script, Products.aspx, that handles virtual pages (much like WordPress does), referred to as "categories" since its primary use is for displaying groups of products in our ecommerce software. On the testing branch, this page is reloaded at random intervals between instantly and a few seconds. It's not registered as a PostBack (the <code>if (!IsPostBack)</code> registers as <code>true</code> when stepping through).</p> <p>While it's making these infinite calls, it is creating a new thread every time through the page. Chrome Developer Tools says "waiting" time is 1.5-2 minutes (1.7 minutes the last time), and <code>WebResource.axd</code> and <code>ScriptResource.axd</code> are continuing as "pending" for several minutes.</p> <p>Any ideas?</p> <p>EDIT: Some code:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack &amp;&amp; !IsCallback) LoadList(); } private void LoadList() { int categoryId = Http.PrmIntOrZero["CategoryId"]; string search = Http.PrmOrEmpty["Search"]; DataRow c = DBCategory.GetOrNull(categoryId); if (c == null) { Response.Redirect("~/", true); return; } TitleC.Text = (string)c["Name"]; Description.Text = System.Convert.ToString(c["Description"]); } </code></pre> <p>Note: Http.PrmIntOrZero is simply a method of calling the querystring with a shorter line.</p> <p>EDIT 2: I went ahead and committed it up to a live environment as-is and it works just fine. I can't explain it, but it must have to do with Visual Studio's debugging process on that particular dev server, only it occurred in IIS Express as well...</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.
    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