The Page cannot be displayed screen

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am displaying a form with a datagrid populated from a select of database
records which now exceed 12,000 when I select them all.

The form displays just fine with all 12,000+ entries but when I leave the
form to go back to the originating screen, I get a "The page cannot be
displayed" screen for "Cannot find server or DNS Error" "Internet Explorer".
You know the page - it starts with "The page you are looking for is currently
unavailable....Please try the following: Click the Refresh Button, or try
again later...." etc etc.

But when I select a lesser number of records - under 12,000 (I don't
think there is anything sacred about 12,000 - that could vary based on the
amount of data fields in each line), when I leave the form to go back to the
originating screen, the originating screen comes back just fine.

Is there a limit in the size of a datagrid or the overall form? What do
you think?
 
Bob said:
The form displays just fine with all 12,000+ entries but when I leave the
form to go back to the originating screen, I get a "The page cannot be
displayed" screen for "Cannot find server or DNS Error" "Internet Explorer".
There is no limit to the number of rows in a DataGrid nor the size of a
form. You're probably getting an exception in your ASP.NET application
which again results in an HTTP Error. If you switch off friendly HTTP
error messages in Internet Explorer you will be able to see this error.
To switch off friendly HTTP error messages go to Tools > Internet
Options > Advanced and uncheck the "Show friendly HTTP error messages"
option in the Browsing option group.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
 
Thanks Anders

I did as you said to switch off friendly HTTP error messages in IE.

Still doesn't work. I still get the "The Page cannot be displayed" screen.
I don't see any error you are refering to by switching this off.

I tried another approach in my development environment (Professional
2002) to locate the source of the problem as follows:

As I said before selecting under 12,000 records makes the page display
fine - over 12,000 gets the "the Page cannot be displayed" sreen.

In my development environment, there is a difference in what is displayed:

Under 12,000 no problem. Over 12,000 returns a "Enter Network Password"
dialog box with "Please type your username and password". Then clicking on
OK gets you "The Page cannot be displayed" screen. However, clicking on
Cancel gets you a "You are not authorized to view this page" screen (do not
get this in live environment). On this page by clicking on a Microsoft
Support link, you get to a page that says "Error Message: 401 Error
(Unathorized: Logon Failed)". The resolution stated to fix this is:

1. Open the Local Security Policy tool from the Adminstrative Tools folder.
2. Select Local Policies, choose User Rights Assignments, and then click
the Log on Locally user right.

Did this - still gets the same two pages "The page cannot be displayed"
or "You are not authorized to view this page"

I then put in my code a Try Catch block to encase the "Response.Redirect
that I have been doing to go back to the originating page that produced the
report form.

In the Xcp.Message I get "Thread was being aborted", the program still
redirects back to the originating program for under 12,000 records, but
produces the "Enter Network Password" dialog box I described above for over
12,000 records.

Thanks again Anders for any support you can give.
 
Bob said:
(abridged) Under 12,000 no problem. Over 12,000 returns a "Enter Network Password"
dialog box with "Please type your username and password". Then clicking on
OK gets you "The Page cannot be displayed" screen. However, clicking on
Cancel gets you a "You are not authorized to view this page" screen (do not
get this in live environment). On this page by clicking on a Microsoft
Support link, you get to a page that says "Error Message: 401 Error
(Unathorized: Logon Failed)".
Is your 12,000+ database query long-running? I'm suspecting that the
exception is caused a session timeout or a connection timeout. Try to
prolong the Server.ScriptTimeout setting. This setting corresponds with
executionTimeout attribute of the <httpRuntime> element within the
<system.web> element web.config. You can also try to prolong the
"connection timeout" specified in the connection string. The default
setting is 15 seconds.

If you still out of luck, please provide an example of the code used to
populate the data grid and a description of your environment including
authentication mode used, database configuration and similar.
(abridged) I then put in my code a Try Catch block to encase the "Response.Redirect
that I have been doing to go back to the originating page that produced the
report form.

In the Xcp.Message I get "Thread was being aborted", the program still
redirects back...
You get the "Thread was being aborted" exception because
HttpResponse.Redirect calls the HttpResponse.End method which in turn
aborts the thread. The HTTP headers or HTML code needed to redirect the
response has been emitted to the browser at this point, so the user will
end up at the redirection target. This exception has nothing to do with
the +/- 12,000 row problem you're experiencing.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
 
Hi Anders:

Thank you for hanging in here with me.

Due to the amount of typing required for this reply (no copy and paste), I
replied at your web site.
 
Anders:

Case closed. Thanks for your help. Read your bio on web site. Norway,
huh? I am a Norske.

Through other sources, I have found out you were close in your possible
solutions of prolonging the Server.ScriptTimeout setting or connection
timeout in the connection string in Web.Config, but not the answer.

The "Page cannot be displayed" screen was eliminated and the program
exits fine now by the following Web.config setting:

<httpRunTime maxRequestLength = "20480" />

The default is 4MB, extending to 20Mb makes the exit work.
 
Back
Top