A lot of lead up:
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.
The user enters a alphanumeric id, and clicks a button. The button's onclick() in the aspx.cs:
1. calls a stored procedure to determine if it a new record, or the existing data if it already exists
2. if the record exists, then pre-fills the form with the existing values.
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.
When the user is done entering the data, there is a single button to save the record, which:
1. calls a stored procedure, which either inserts or updates accordingly
2. clears the webform
3. displays a quick success message.
There have been over 4000 records inserted and updated through this form since it's launch. I now have a problem where there is ONE record that cannot be updated, it was inserted a month ago, through the same form, without issue.
In Internet Explorer (6, 7 and 8): 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.
In Firefox 3: When you click the save button, it displays the "Connection interrupted" screen. Clicking the "Try Again" button does not change the results.
There are no entries in the logging that the application uses, the server's Event Log, nor for SQL Server 2005.
I have tried:
- on different computers, and it failed.
- with different users, and it failed.
- with numerous other records, and they update perfectly.
I have loaded the record into the test environment in two different manners:
1. copied and pasted directly from the production database to the test database
2. copied and pasted directly from the production webform to the test webform.
The issue does not happen in test or my local development system. Both production and test are running ASP .NET 3.5 SP1.
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.
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.
A coworker suggested setting viewStateEncryptionMode="never"
in the web.config and this has 'fixed' the problem, and the record can now be updated without error.
Unfortunately, I cannot provide the data that is causing the form to fail.
My question:
Does anyone have an idea why this happened in the first place or why setting viewStateEncryptionMode="never"
fixed it? A better solution than setting the ViewStateEncryptMode to never would also be welcome.
Thanks!