title: Asks for AD credentials / "Connection Interrupted" on Postback
body: <p>A lot of lead up:</p>
  
  <p>I have a simple ASP .NET 3.5 data entry webform with a series of dropdown lists, text boxes, and text areas and user authentication is being handled by Active Directory.  </p>
  
  <p>The user enters a alphanumeric id, and clicks a button.  The button's onclick() in the aspx.cs:<br>
   1. calls a stored procedure to determine if it a new record, or the existing data if it already exists<br>
   2. if the record exists, then pre-fills the form with the existing values.   </p>
  
  <p>There are three textboxes which have been extended to use ASP .NET AJAX AutoComplete (each contained in their own asp:UpdatePanel), which also postback successfully. </p>
  
  <p>When the user is done entering the data, there is a single button to save the record, which:<br>
   1. calls a stored procedure, which either inserts or updates accordingly<br>
   2. clears the webform<br>
   3. displays a quick success message.</p>
  
  <p>There have been over 4000 records inserted and updated through this form since it's launch.  I now have a problem where there is <strong>ONE</strong> record that cannot be updated, it was inserted a month ago, through the same form, without issue.</p>
  
  <p><em>In Internet Explorer (6, 7 and 8):</em>  When you click the save button, it asks for you to provide your domain username and password. Entering a valid username and password displays the "Internet Explorer cannot display the webpage" screen.</p>
  
  <p><em>In Firefox 3:</em> When you click the save button, it displays the "Connection interrupted" screen. Clicking the "Try Again" button does not change the results.</p>
  
  <p>There are no entries in the logging that the application uses, the server's Event Log, nor for SQL Server 2005.</p>
  
  <p>I have tried:<br>
  - on different computers, and it failed.<br>
  - with different users, and it failed.<br>
  - with numerous other records, and they update perfectly. </p>
  
  <p>I have loaded the record into the test environment in two different manners:<br>
   1. copied and pasted directly from the production database to the test database<br>
   2. copied and pasted directly from the production webform to the test webform.<br>
  The issue does not happen in test or my local development system.  Both production and test are running ASP .NET 3.5 SP1.</p>
  
  <p>I even saved a copy of the production page which is failing and the test page which works as HTML and ran them through Total Commander's "Compare Files by Content" function, in the hopes that the differences would be highlighted in red to be nice and obvious. The only differences were in the areas auto-generated by .NET at runtime, and the occasional place where a dropdown's item list has more entries in production then in test.</p>
  
  <p>I realize there is probably something wrong with the data that is causing the final postback to fail, but it appears to be failing before the postback even starts. I have looked through the record's data through viewing the source of the loaded aspx page and in the database in the hopes of finding a stray invisible character or a textarea that has too many characters that may be causing it to choke, but no luck.</p>
  
  <p>A coworker suggested setting <code>viewStateEncryptionMode="never"</code> in the web.config and this has 'fixed' the problem, and the record can now be updated without error. </p>
  
  <p>Unfortunately, I cannot provide the data that is causing the form to fail.</p>
  
  <p><strong>My question:</strong>
  Does anyone have an idea why this happened in the first place or why setting <code>viewStateEncryptionMode="never"</code> fixed it? A better solution than setting the ViewStateEncryptMode to never would also be welcome.</p>
  
  <p>Thanks!</p>