Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2004, 02:43 AM
Authorized User
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default application & services in ASP

i am trying to develop a software with an ASP frontend & an SQL server backend. my OS is WIN NT. now this software needs to run 24/7 as a background process. i was told by someone that this can be done by making my software as an application & then running that application as a service. can some one please help me on:
what are applications?
how can i make an application of my software comprising of ASP pages?
how are applications run as services?

one more thing
if i want a particular ASP function or a stored procedure to be executed say every 1 minute, how can that be accomplished???
 
Old March 25th, 2004, 11:36 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you need to create a program that runs all the time on a server, it shouldn't be written in ASP. That's really not the purpose of ASP. Depending on what runtime environments you have available you could write it in VB6 or .NET. If your goal is to have this application/process run periodically you could simply build the application and use the standard operating system scheduling functionality to set up the application to run at the time you wish (every minute).

I don't see how a process like this could have a "front end" so I can only imagine that you have some process that is doing some type of data manipulation. If this is the case you might be able to do it all within SQL server and use SQL server's job scheduling to run the job at the time interval desired.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old March 26th, 2004, 12:51 AM
Authorized User
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i think u got it all wrong
let me try again

i am developing a customer care system

now when the coordinator receives a complaint, he assigns the complaint a priority & assigns it to an engineer. say the priority is level 1, then the engineer should have taken care of it in 15 minutes. now lets say he wasnt able to fix the problem in 15 minutes (he needs to explicitly set the status of complaint from 'pending' to 'done' for that), then an email should be sent to the coordinator, the engineer & the customer (i am generating this mail through ASP & not SQLmail . for this i think a recordset should be opened wherein the status is pending. now, for all the records where the stipulated priority time period hasnt expired, i need a process that keeps reading this recordset repeatedly so that when the end of the recordset is reached, it comes back to the beginning & start traversing again

now all this is happening while the window is open, but when the coordinator closes the window, the recordset should still be read & the emails should still be sent. how will that be achieved?

i hope i have given u exhaustive details this time ........


Quote:
quote:Originally posted by planoie
 If you need to create a program that runs all the time on a server, it shouldn't be written in ASP. That's really not the purpose of ASP. Depending on what runtime environments you have available you could write it in VB6 or .NET. If your goal is to have this application/process run periodically you could simply build the application and use the standard operating system scheduling functionality to set up the application to run at the time you wish (every minute).

I don't see how a process like this could have a "front end" so I can only imagine that you have some process that is doing some type of data manipulation. If this is the case you might be able to do it all within SQL server and use SQL server's job scheduling to run the job at the time interval desired.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old March 26th, 2004, 04:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi a_pathak,

Thanks for your personal message. I'll answer here instead, if you don't mind.

With regards to your answer to Peter, I think you're the one that got it all wrong. Or at least partly.

You're trying to use ASP for something that it isn't designed for. You can't have an ASP page repeatedly read recordsets, and you can't really have the page automatically send an e-mail when the 15 minutes have passed. But most importantly, you can't have the page continue to read the database when the user has closed the browser window.
To repeat your own words: you "need a process that keeps reading this recordset repeatedly". ASP is a one-hit application: you request a page, the page is constructed at the server and then sent to the client / browser where it is displayed. That's it.

I think we have had this all before in these threads:
http://p2p.wrox.com/topic.asp?TOPIC_ID=11315
http://p2p.wrox.com/topic.asp?TOPIC_ID=11047

And the recommendations were: use something that runs on the server, checks what it needs to check and does what it needs to do.
So, from what I can see, your options are:

1. Create a Windows Service Application. This app will start when Windows starts, and continuously checks the database.
2. Use the SQL Server Agent in combination with DTS. Create a package that does what it needs to do, and schedule it with SQL Server agent.
3. Use Notification Services, as suggested by Joe. Read the docs for Notification Services; it's not only for .NET.
4. Create a custom application, VBScript / WSH script page and schedule that using AT or the Windows scheduler. Have it fire every minute, and have it send out e-mail to customers of expired complaints.

If this is not what you want, you either don't want to listen to solid advice from lots of people on this forum [read: stubborn ;)], or you're trying to design and create the impossible, or you're missing some important base concepts of the technologies you insist to work with. This may sound a bit harsh, but that's not my intention. I am just trying to clarify your options.....

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 28th, 2004, 01:12 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You are certainly welcome to have the engineers or any other party use a web based interface to change the data for the complaints to "done". This is perfectly acceptable and would most likely be easier for you to build and maintain because you won't have to worry about deploying applications.

However, the fact remains you'll need a separate process (using a whole different technology) to achieve the background monitoring for this application.
 
Old March 29th, 2004, 07:26 AM
Authorized User
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks a lot for taking all the trouble in helping me! my process has finally worked. i saved as a .vbs file & scheduled it with my OS scheduler. its finally working!
thanx planoie! thanx imar!

al
 
Old March 29th, 2004, 08:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great. It sounds like you found the right tool for the right job!

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2002 & Windows Print Services issue voyeur Access VBA 1 August 6th, 2008 06:56 AM
SharePoint Portal Server & Share Point services in shipra srivastava ASP.NET 1.0 and 1.1 Basics 2 October 10th, 2007 12:11 AM
Copy files & Folders application in ASP.net rupakroy5 ASP.NET 1.0 and 1.1 Basics 0 May 8th, 2006 10:45 PM
Web Application and Internet Information Services deniscuba VS.NET 2002/2003 0 March 31st, 2005 02:26 PM
Run and Debug Application Using Directory Services tushpri General .NET 0 February 12th, 2005 02:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.