View only in IE

I have a page containing some search fields to query the database and display the results. To view lists of items in drop-down menus, a viewstate is required.

Everything works fine in Firefox (3) and Chrome, but it doesn’t work in Internet Explorer, but only occasionally (some actions, such as resetting the form, which really just does response.redirect with some querystring options) ... what happens in Viewstate, which is reset by URL and an error page is created.

Has anyone come across this before? Perhaps some pointers to what might cause this in IE?

Thanks heaps

Greg

UPDATE:

In the course of further research, I determined that the actual error is as follows:

"Failed to validate viewstate MAC address. If this application is hosted by a web farm or cluster, make sure the configuration has the same validationKey and validation algorithm. AutoGenerate cannot be used in the cluster.

Additional information that may help: This is caused by a user control that is hosted in a content management system (Umbraco), which may have something to do with why the view is viewed on the page (it is contained on the larger page in the CMS as control). I will explore this a little further, but any other suggestions would be much appreciated.

amuses greg

UPDATE 2:

- , IE ( FF Chrome)? , , , .

, IE -,

:

, - - CMS 2 . , !

bendewey , (. bendewey).

4 , ... , . :)

+3
3

, viewstate Url. , , GET asp.net .

GET, EnableViewState = "false" - . , ( , , ). , - .

List<string> getCachedFields()
{
    var searchFields = Cache["searchFields"] as List<string>;
    if (searchFields == null)
    {
        searchFields = GetFieldsFromDbOrSomewhereExpensive();
        Cache["searchFields"] = searchFields;
    }
    return searchFields;
}
+1

, . , ...

+1

EnableViewStateMac="false" <pages>, IE.

0
source

Source: https://habr.com/ru/post/1703016/


All Articles