Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP timeout.... or vb app?

Reply
Thread Tools

ASP timeout.... or vb app?

 
 
twindscheffel@googlemail.com
Guest
Posts: n/a
 
      12-18-2008
I have an asp page that runs as a Scheduled Task on an un-manned PC
(Win XP Pro). It loops through a list of recipients, runs a SQL query
for each one, formats the results (if any) as HTML and writes the html
back in to the database at the same time as sending the email.

At the moment, we are only testing it and it sends about 10 emails at
once, taking perhaps a second or two which is fine. When I make it
available to other users, there could be as many as 1000 emails to
send (and there could be 2 sql queries to run for each email) so I am
concerned that that asp page may time out.

Would it be better to use an asp timeout command to increase the time
permitted to run, or would it be better to turn in to a vbs file or
even make it a vb application?

Incidentally, I have tried to write vb applications using VB Studio
Express 2008 but can't find a way to create a connection to my
external SQL database. I know this is probably not the best place to
start but can anyone give a definite yes/no answer to whether it is
possible to connect to external SQL databases in VB Studio express?
(and if yes, any sample code anywhere?)

Thanks
 
Reply With Quote
 
 
 
 
Daniel Crichton
Guest
Posts: n/a
 
      12-18-2008
wrote on Thu, 18 Dec 2008 07:01:58 -0800
(PST):

> I have an asp page that runs as a Scheduled Task on an un-manned PC
> (Win XP Pro). It loops through a list of recipients, runs a SQL query
> for each one, formats the results (if any) as HTML and writes the html
> back in to the database at the same time as sending the email.


> At the moment, we are only testing it and it sends about 10 emails at
> once, taking perhaps a second or two which is fine. When I make it
> available to other users, there could be as many as 1000 emails to send
> (and there could be 2 sql queries to run for each email) so I am
> concerned that that asp page may time out.


> Would it be better to use an asp timeout command to increase the time
> permitted to run, or would it be better to turn in to a vbs file or
> even make it a vb application?


Personally I'd make it a VBS file if the task is run on the same machine
that has IIS and the ASP page on, that way you're not relying on the ASP
engine and IIS, or invoking via a call to a web browser, so there are fewer
potential problems as there will be fewer applications in the chain.

--
Dan


 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      12-18-2008
wrote:
> I have an asp page that runs as a Scheduled Task on an un-manned PC


Huh? Why are you using an asp page for a task that a simple vbscript
file could do? See http://www.aspfaq.com/show.asp?id=2143


--
HTH,
Bob Barrows


 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      12-18-2008
On 18 Dec, 15:11, "Bob Barrows" <reb01...@NOyahoo.SPAMcom> wrote:

> Huh? Why are you using an asp page for a task that a simple vbscript
> file could do? Seehttp://www.aspfaq.com/show.asp?id=2143


Sorry, should have elaborated a little bit. Currently the scheduled
tasks calls a URL in IE - so the asp page is hosted on a web server
with the SQL server. I am all self taught starting with asp so dont
have any background in vb other than what i know from asp.

The only problem i see with my current setup is that the template html
for the email is stored as an html file on the webserver -could a vb
script read the text from that file using even though it is on a
different server? I suppose I could store the html in the database.

IIS is installed on the PC the scheduled task runs on, so i guess
CDONTS should work for sending the emails?

Thanks for your help
Tom
 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      12-18-2008
Tom wrote:
> On 18 Dec, 15:11, "Bob Barrows" <reb01...@NOyahoo.SPAMcom> wrote:
>
>> Huh? Why are you using an asp page for a task that a simple vbscript
>> file could do? Seehttp://www.aspfaq.com/show.asp?id=2143

>
> Sorry, should have elaborated a little bit. Currently the scheduled
> tasks calls a URL in IE - so the asp page is hosted on a web server
> with the SQL server.


On a different box?

> I am all self taught starting with asp so dont
> have any background in vb other than what i know from asp.


You must not have read my link: no vb required: only the vbscript you
used in your asp page.


>
> The only problem i see with my current setup is that the template html
> for the email is stored as an html file on the webserver -could a vb
> script read the text from that file using even though it is on a
> different server? I suppose I could store the html in the database.
>
> IIS is installed on the PC the scheduled task runs on, so i guess
> CDONTS should work for sending the emails?
>


It depends. It may already be installed. It is very likely that you want
to be using CDO, not CDONTS:
http://classicasp.aspfaq.com/email/h...-with-cdo.html

--
HTH,
Bob Barrows


 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      12-18-2008
On 18 Dec, 15:47, "Bob Barrows" <reb01...@NOyahoo.SPAMcom> wrote:

> > Sorry, should have elaborated a little bit. Currently the scheduled
> > tasks calls a URL in IE - so the asp page is hosted on a web server
> > with the SQL server.

>
> On a different box?


Yes - scheduled task on PC at home, SQL hosted on a remote server, and
website hosted on a separate webserver elsewhere. The asp page and the
html file are both on the webserver.

> > I am all self taught starting with asp so dont
> > have any background in vb other than what i know from asp.

>
> You must not have read my link: no vb required: only the vbscript you
> used in your asp page.


I did read the link - thanks, was very helpful - was just answering
your first question of why I used an asp page in first place and not
vb!! Looks like I just need to change the server.createobject and
remove the response.write references I have that are used for
debugging.

>
> > The only problem i see with my current setup is that the template html
> > for the email is stored as an html file on the webserver *-could a vb
> > script read the text from that file using even though it is on a
> > different server? I suppose I could store the html in the database.

>
> > IIS is installed on the PC the scheduled task runs on, so i guess
> > CDONTS should work for sending the emails?

>
> It depends. It may already be installed. It is very likely that you want
> to be using CDO, not CDONTS:http://classicasp.aspfaq.com/email/h...-with-cdo.html


You're right, i'm using CDO currently on the webserver so shouldnt be
an issue. Have just checked on the local machine and CDO is installed
so i'll give it a whirl. Thanks very much!!
 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      12-18-2008
Tom wrote:
> You're right, i'm using CDO currently on the webserver so shouldnt be
> an issue. Have just checked on the local machine and CDO is installed
> so i'll give it a whirl. Thanks very much!!


If you can access the sql server from your local machine, then you won't
even need to bother the web server box.

--
HTH,
Bob Barrows


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
global filter to redirect asp (old asp!) pages on asp.net site Daves ASP .Net 2 05-31-2006 08:33 AM
2.0: asp:Menu, asp:XmlDataSource, asp:PlaceHolder R.A.M. ASP .Net 1 03-29-2006 07:55 AM
[ASP.NET1.1]Should I kill the ASP.NET worker process after recompilingmy ASP.NET webservice? Andrea Raimondi ASP .Net 1 02-06-2006 08:10 AM
ASP.Net cookie -> ASP -> ASP.Net Ben ASP .Net 3 05-28-2004 03:35 PM
LOOP through an ASP form's pages (not ASP.NET - ASP classic) David A. Beck ASP General 10 04-13-2004 05:38 PM



Advertisments