If you have above error displayed as soon as you do post back on your page while rest of your app is still working then you might have huge viewstate data in your page.
Normally it happens when you are loading a page displaying several hundreds records, that may generate very big viewstate value inside your page. The loading will work fine but as soon as you post back the page it will throw that error. Reason is your page becomes too bulky to be accepted by server.
To solve the problem you obviously have to reduce the side of the viewstate by either disabling viewstate on your page or disable on selected controls where it is not needed, if both of these is not possible then simply reduce the number of records displayed at a time.
Ok, that’s a generic solution but in Asp.Net framework 2.0 you can handle it by using an in-built feature called “Viewstate chunking”, this will chunk out the viewstate data so that not a single large element is generated.
Update: If you are using framework 1.1 then there is an option of in-memory viewstate compression. Check this link for more details ( I have implemented it using vb.net so you can ask me for help).
September 18, 2008 at 8:58 am
During execution of the asp.net program
http://localhost:1102/Relation%20Based%20Semantic%20Web/Admin_DomainNames.aspx
The page cannot be displayed – error on I.E. why ? How I solve ?
September 18, 2008 at 3:42 pm
First of all make sure that the Page actually exists on the Path and the spelling is correct.
If everything works fine then check the viewstate size, is it so large?
November 24, 2008 at 5:07 am
I tried to embed a video file in html using vb.net. I know the file size should be not more than 4 mb , but how can i intimate the user if he uploads more than 4 mb without seeing the max upload size . when the user select a file say ab.avi which is 5.0 mb the page automatically redirected to page cannot be displayed
any suggestion to redirect it !
Regards
Karthick N
karthick001@ymail.com
November 24, 2008 at 9:34 am
Hi Karthick,
Unfortunately there is no graceful way yet to handle this problem. At max you can put a warning note next to upload control about size limit or simply increase the limit by setting maxRequestLength property in web.config.
May 6, 2009 at 10:52 pm
I have a login page, which checks the database to see of the username and password match the entries on the webpage. The third time the wrong entries are input, on postback, the page displays “Page cannot be refreshed.” Would you know why this happens? I do not have logic written in code to check for three attempts. I have not set any authorization settings in the web.config file also.
May 7, 2009 at 5:38 am
Hi T.S
Can you paste your code here so that I can see what exactly your code does?
Sandip