Hi everyone,
I have a ASP page that triggers a db-side stored procedure. At the end of
the procedure, it spits out a log file, that this ASP page reads and displays
for the users.
But the problem is that the database-stored Proc could take anything between
10 secs - to - 10 mins. I dont want the page to time out [But I dont want to
increase the time out in the IIS webserver]. Is there a way, like the
airlines websites do, where I can just show an animated gif while the
procedure runs and redirect the page to results at the end of the procedure
run.
ex: like orbitz or hotwire.... or anything like that, but not as complicated
as them.
Hope I made my question clear,
any ideas are truely appreciated,
_Mac 6 1967
Uday wrote: Hi everyone, I have a ASP page that triggers a db-side stored procedure. At the end of the procedure, it spits out a log file, that this ASP page reads and displays for the users.
But the problem is that the database-stored Proc could take anything between 10 secs - to - 10 mins. I dont want the page to time out [But I dont want to increase the time out in the IIS webserver]. Is there a way, like the airlines websites do, where I can just show an animated gif while the procedure runs and redirect the page to results at the end of the procedure run.
?? What happens if the user closes the browser? ex: like orbitz or hotwire.... or anything like that, but not as complicated as them.
Not without some client-side code (see a javascript/jscript newsgroup). You
could use an xmlhttp object (AJAX) to periodically (using setTimeout) submit
to a server-side page that checks to see if the process is complete.
However, this could be very insecure: since it's all in client-side script,
it's visible to anyone who is knowledgeable enough to View Source or
retrieve the script from the browser cache (not at all hard to do). You
really need to know what you are doing to ensure that a user's session
cannot be hijacked.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:eI******** ******@TK2MSFTN GP02.phx.gbl... Uday wrote: Hi everyone, I have a ASP page that triggers a db-side stored procedure. At the end of the procedure, it spits out a log file, that this ASP page reads and displays for the users.
But the problem is that the database-stored Proc could take anything between 10 secs - to - 10 mins. I dont want the page to time out [But I dont want to increase the time out in the IIS webserver]. Is there a way, like the airlines websites do, where I can just show an animated gif while the procedure runs and redirect the page to results at the end of the procedure run. ?? What happens if the user closes the browser? ex: like orbitz or hotwire.... or anything like that, but not as complicated as them.
Not without some client-side code (see a javascript/jscript newsgroup).
You could use an xmlhttp object (AJAX) to periodically (using setTimeout)
submit to a server-side page that checks to see if the process is complete. However, this could be very insecure: since it's all in client-side
script, it's visible to anyone who is knowledgeable enough to View Source or retrieve the script from the browser cache (not at all hard to do). You really need to know what you are doing to ensure that a user's session cannot be hijacked.
How does using this approach expose the session to a greater risk of
hijacking? -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
Anthony Jones wrote: Not without some client-side code (see a javascript/jscript newsgroup). You could use an xmlhttp object (AJAX) to periodically (using setTimeout) submit to a server-side page that checks to see if the process is complete. However, this could be very insecure: since it's all in client-side script, it's visible to anyone who is knowledgeable enough to View Source or retrieve the script from the browser cache (not at all hard to do). You really need to know what you are doing to ensure that a user's session cannot be hijacked.
How does using this approach expose the session to a greater risk of hijacking?
The ID used to identify the asynchronous process may need to be part of the
xmlhttp submission, and, if the session ID is not being used, then that ID
will appear in plain text in the page's source. If the ID is something like
a user's email address or name, then it's guessable, right?
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:%2******** *******@TK2MSFT NGP02.phx.gbl.. . Anthony Jones wrote: Not without some client-side code (see a javascript/jscript newsgroup). You could use an xmlhttp object (AJAX) to periodically (using setTimeout) submit to a server-side page that checks to see if the process is complete. However, this could be very insecure: since it's all in client-side script, it's visible to anyone who is knowledgeable enough to View Source or retrieve the script from the browser cache (not at all hard to do). You really need to know what you are doing to ensure that a user's session cannot be hijacked. How does using this approach expose the session to a greater risk of hijacking? The ID used to identify the asynchronous process may need to be part of
the xmlhttp submission, and, if the session ID is not being used, then that ID will appear in plain text in the page's source. If the ID is something
like a user's email address or name, then it's guessable, right?
I see what you mean.
With or without using the Session ID it's still a good idea to allocate a
unique ID to the process. A GUID would be a good choice coupled with a
comparison of REMOTE_ADDR to which the GUID was originally issued.
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
Uday wrote: Hi everyone, I have a ASP page that triggers a db-side stored procedure. At the end of the procedure, it spits out a log file, that this ASP page reads and displays for the users. But the problem is that the database-stored Proc could take anything between 10 secs - to - 10 mins. I dont want the page to time out [But I dont want to increase the time out in the IIS webserver]. Is there a way, like the airlines websites do, where I can just show an animated gif while the procedure runs and redirect the page to results at the end of the procedure run. ex: like orbitz or hotwire.... or anything like that, but not as complicated as them. Hope I made my question clear, any ideas are truely appreciated, _Mac
Rather than tie up the user's browser, you could do the following:
allocate a unique identifier (GUID, random number) embedded in a URL:
e.g. http://www.mysite.com/scheduledjobs?jobid=123456
and return that URL to the user with a message such as
"Request submitted: it will take some time to complete. Please click
<a href="http://www.mysite.com/scheduledjobs?j obid=123456">he re</a>
to check for completion.
Or you could redirect to that URL immediately (see next item).
Create an ASP page, e.g., http://www.mysite.com/scheduledjobs
which, when passed a jobid value, checks to see whether the job (stored
procedure execution) with that jobid has completed. If so, the ASP page
redirects to a URL created by the stored procedure, (e.g., http://www.mysite.com/jobs/123456.log ). If, on the other hand, the
stored procedure hasn't finished, inform the user of that.
This allows the user to bookmark a report URL. They can periodically
return to see if the report has finished or e-mail the URL to someone.
So to reiterate:
1. The user executes a request to the URL, say, http://www.mysite.com/jobrequest.asp?custid=55555
and is immediately returned a page, say http://www.mysite.com/scheduledjobs.asp?jobid=123456
that shows a "report URL" where the finished report will later appear,
2. jobrequest.asp validates input data and stores request information
(jobid and all inputs) in a database table e.g., JOBTABLE.
3. A background job executes periodically or as requested, reading the
database table JOBTABLE and looking for new entries. When a new entry is
found, the stored procedure is executed and the output of the stored
procedure stored to a new report URL http://www.mysite.com/jobs/123456.log
Finally JOBTABLE is updated to indicate that the job completed and the
name of the report URL is entered into that table.
See http://aspfaq.com/show.asp?id=2143 for details on how to
trigger/schedule a background job.
4. scheduledjobs.a sp, when passed a jobid, checks JOBTABLE and/or the
report URL to see if the jobid is valid and whether the job has
completed. If the job has completed, scheduledjobs.a sp redirects to the
report URL for that jobid. Otherwise it informs the user that the jobid
does not exist or that the job has not completed. [Alternately
scheduledjobs.a sp could have various utility functions as listing all
outstanding/completed jobs for that user or all users.]
5. Possibly write a periodic stored procedure to remove/archive old
report URLs and delete old entries from JOBTABLE.
Thanks Michael. Your suggestion sounds close to what I was looking for. I'll
try it. Thanks for your suggestions to Bob... I didn't get my hands dirty yet
with AJAX, so it sounds pretty complicated. But when I have more time, I'll
try your idea too.
thanks again,
_Uday
"Michael D. Kersey" wrote: Uday wrote: Hi everyone, I have a ASP page that triggers a db-side stored procedure. At the end of the procedure, it spits out a log file, that this ASP page reads and displays for the users. But the problem is that the database-stored Proc could take anything between 10 secs - to - 10 mins. I dont want the page to time out [But I dont want to increase the time out in the IIS webserver]. Is there a way, like the airlines websites do, where I can just show an animated gif while the procedure runs and redirect the page to results at the end of the procedure run. ex: like orbitz or hotwire.... or anything like that, but not as complicated as them. Hope I made my question clear, any ideas are truely appreciated, _Mac
Rather than tie up the user's browser, you could do the following:
allocate a unique identifier (GUID, random number) embedded in a URL: e.g. http://www.mysite.com/scheduledjobs?jobid=123456 and return that URL to the user with a message such as "Request submitted: it will take some time to complete. Please click <a href="http://www.mysite.com/scheduledjobs?j obid=123456">he re</a> to check for completion. Or you could redirect to that URL immediately (see next item).
Create an ASP page, e.g., http://www.mysite.com/scheduledjobs which, when passed a jobid value, checks to see whether the job (stored procedure execution) with that jobid has completed. If so, the ASP page redirects to a URL created by the stored procedure, (e.g., http://www.mysite.com/jobs/123456.log ). If, on the other hand, the stored procedure hasn't finished, inform the user of that.
This allows the user to bookmark a report URL. They can periodically return to see if the report has finished or e-mail the URL to someone.
So to reiterate: 1. The user executes a request to the URL, say, http://www.mysite.com/jobrequest.asp?custid=55555 and is immediately returned a page, say http://www.mysite.com/scheduledjobs.asp?jobid=123456 that shows a "report URL" where the finished report will later appear,
2. jobrequest.asp validates input data and stores request information (jobid and all inputs) in a database table e.g., JOBTABLE.
3. A background job executes periodically or as requested, reading the database table JOBTABLE and looking for new entries. When a new entry is found, the stored procedure is executed and the output of the stored procedure stored to a new report URL http://www.mysite.com/jobs/123456.log Finally JOBTABLE is updated to indicate that the job completed and the name of the report URL is entered into that table.
See http://aspfaq.com/show.asp?id=2143 for details on how to trigger/schedule a background job.
4. scheduledjobs.a sp, when passed a jobid, checks JOBTABLE and/or the report URL to see if the jobid is valid and whether the job has completed. If the job has completed, scheduledjobs.a sp redirects to the report URL for that jobid. Otherwise it informs the user that the jobid does not exist or that the job has not completed. [Alternately scheduledjobs.a sp could have various utility functions as listing all outstanding/completed jobs for that user or all users.]
5. Possibly write a periodic stored procedure to remove/archive old report URLs and delete old entries from JOBTABLE. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: michael_vanommeren |
last post by:
I have two web applications that I am working with and I am trying to do a
Response.Redirect from one to the other. They are setup as separate web
applications on the same IIS server. If I go directly to the second
application in a browser, all of my events fire correctly. However, if I
have the first application do a Response.Redirect to the second, for some
reason none of my events on the second application ever get fired. After I...
|
by: CK |
last post by:
I have a web page called PageOne.aspx which is supposed to do a long
process but I don't need to show any results to the client, so I want
to redirect the client to PageTwo.aspx right in the beginning of the
Page_Load and then continue with the long process.
So I've tried using Response.Redirect("http://mysite.com/PageTwo.aspx",
false) but the customer is not getting the response only until I finish
processing the whole page.
So I've...
|
by: ESmith |
last post by:
I've written a website that works fine when the user types in the URL into a
browser window. Now, one of our clients, whose website has a left panel
"iframe" menu, put our site in as a link and my site no longer works
corrected. My site uses Session variables and response.redirects.
Is there something about being run in an iframe that will mess up my site -
is this an known issue?
TIA
|
by: Peter Chant |
last post by:
I'm considering setting a website up for a club. I do not plan the contents
to be for public consumption, but on the other hand I'm not going to have
anything on there that is confidential, that would cause a problem if it
went further.
The basic reason is for publicity of club events. I want to make it easy to
use. I suspect a login with a password would be too much effort for most
people. I also note that computer literacy is not a...
|
by: wardy1975 |
last post by:
Hi all, got a bit of a strange one....I am developing in ASP.NET 2.0
and I have some code in my Session_Start method that sets user
attributes. If an error occurs at this time, such as the user is not
registered or configured for the site, I throw an error that is caught
by the Application_Error method of the global.asax file. I proceed to
get the last error information, clear it down, and then I attempt to
redirect to an error page...
| |
by: moni |
last post by:
Hi,
I was hoping I could get a help on this one. I am creating a simple
website, in which I have a login after which the user gets logged in
using a session variable where I append the ID,eg
http://localhost:3944/monisha/Experiments/Projects/Copy/ProfilePage.aspx?ID=1
But from this profile page, I have another search option to look for
other ppl in the database which is getting dispalyed on a page I am
|
by: Atul |
last post by:
Hi
Theres a website that books hotels . user enters the information and
according to that results are displayed to the user.Let it be website
A.
Now I want to create a new project with designing page same as in
website A.
But wen user clicks on submit button on my website then the same
process occurs as is happening when user clicks submit button in
|
by: bugboy |
last post by:
Hi, I'm just learning PHP. I want to redirect the user, after hitting submit, either to the same page displaying the results (as it is now) or if no results are found then send them to a new page passing on the original form data there instead.
Below is a simplified version of what i'm trying to do. The user sumits a word. If it's in the DB then the word is listed below the reset form. What i need is to redirect to a new page "newword.php" if...
|
by: gnawz |
last post by:
Hi guys,
I have a couple of php files that perform various tasks.
I will use fields in my system and provide code as well
I need help as follows:
My database contains the fields Category and Brand
I need to make some changes on a a number of brands in a Category
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |