Solved

"Please Wait" - Under Load

Posted on 2004-09-13
8
451 Views
Last Modified: 2010-04-15
Hi All,

Ok I realize that the title is a bit cryptic so let me explain.

I have an C# web application that generates a few pages on the fly. Basically the ASPX file is empty and I generate everything using Response.Write()

I am now doing stress tests on my server and ak experiencing a problem.

When the server is under stress and I load a page in the app ... the page opens up but except for the title bar everything is just a blank white page ( it's busy loading) ... as this is not very appealing and the user might think that the app has hung I would like to put a "please wait" on the page while the main stuff is loading ... the main data loads from oracle and then writes to the page.

I have tried adding a 'Please wait" to the ASPX page to let it display before the page is regenerated, I have also added a Response.Write("Please Wait");Response.End(); to the Page_Load ... so it shoows it while the real data loads ...

in both cases there is no joy. The page still stays white for a few seconds and once it's done it just displays my data (I'm guessing that my "Please wait" flashes just before my data is displayed) ...

Can anybody help here

Txs
Peter
0
Comment
Question by:Pete2003
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:Kelmen
ID: 12042143
At the approriate event (eg, PageLoad), after you render the text "Please wait"...., use Response.Flush to force this text pass to browser.
0
 
LVL 14

Accepted Solution

by:
AvonWyss earned 500 total points
ID: 12042300
Kelmen's suggestion might work (or might not, depending on whether the browser will already display the message before the page has been fully loaded), and you'll always have the "please wait" message staying on top of the message after the results have been returned.

My suggestion would be to generate two requests: one to a page with only a "Please Wait" message, which inclused a refresh-metatag in the head: <META HTTP-EQUIV=Refresh CONTENT="0; URL=UrlOfPage">

This should make thre browser load the given URL after the page, while still displaying the "please wait" message until the page has loaded.
0
 

Author Comment

by:Pete2003
ID: 12042641
AvonWyss: I hav tried your approach and it does help when the Oracle stuff is loading but it also introduces another wait period ...

as I'm stressing both the oracle and the IIS server, I get a blank page when I load my 'loader page' , then the 'please wait ' appears on my loader page then the real page loads ... granted that the wait period for the 'load page' is much shorter then the 'real page' however there is still a wait period for the 'load page' and there is the extra delay of when the 'load page' loads my 'real page' ... since it's an extra trip to an already busy IIS server ...

Txs
Peter
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:AvonWyss
ID: 12042697
The delay should be quite short, if you pay attention not do do things in the load page (escpecially be aware of things that might be done in the global.asax file for each request). The extra trip is not very expensive, since the HTTP connects will stay open after the please-wait-request.
0
 

Author Comment

by:Pete2003
ID: 12042905
Ok here is my load page ... "reportLoad.html"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<META HTTP-EQUIV=Refresh CONTENT="0; URL=reportMain.aspx">

<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualStudio.HTML>
<meta name=Originator content="Microsoft Visual Studio .NET 7.1">
</head>
<body>
Please Wait ...


</body>
</html>

Is that as 'streamline' as I will get ?
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 12042911
Assuming that the IIS server does not have a script mapping on HTML pages, so that this page is serves as static content, I think that this is about the best you can get...
0
 

Author Comment

by:Pete2003
ID: 12042949
Ok txs ...
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 12042968
Thanks for the points!

Note that the refresh-URL can also be an url on another server if you put in a fully-qualified url (http://...), so that you could have a second server as "back-end" if you really get into performance troubles. But I doubt that the effort and costs of a second server could be worth the little decrease in serving time.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question