ASP timeout.... or vb app?

Discussion in 'ASP General' started by twindscheffel@googlemail.com, Dec 18, 2008.

  1. Guest

    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
     
    , Dec 18, 2008
    #1
    1. Advertising

  2. 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
     
    Daniel Crichton, Dec 18, 2008
    #2
    1. Advertising

  3. Bob Barrows Guest

    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
     
    Bob Barrows, Dec 18, 2008
    #3
  4. Tom Guest

    On 18 Dec, 15:11, "Bob Barrows" <> 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
     
    Tom, Dec 18, 2008
    #4
  5. Bob Barrows Guest

    Tom wrote:
    > On 18 Dec, 15:11, "Bob Barrows" <> 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/how-do-i-send-e-mail-with-cdo.html

    --
    HTH,
    Bob Barrows
     
    Bob Barrows, Dec 18, 2008
    #5
  6. Tom Guest

    On 18 Dec, 15:47, "Bob Barrows" <> 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/how-do-i-send-e-mail-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!!
     
    Tom, Dec 18, 2008
    #6
  7. Bob Barrows Guest

    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
     
    Bob Barrows, Dec 18, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Johnson
    Replies:
    0
    Views:
    3,775
    Bob Johnson
    Aug 7, 2003
  2. Do
    Replies:
    2
    Views:
    6,382
  3. Guoqi Zheng
    Replies:
    4
    Views:
    13,035
    Guoqi Zheng
    Jun 3, 2004
  4. Headless Rider

    Control asp.net app from other asp.net app

    Headless Rider, Aug 18, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    113
    Headless Rider
    Aug 18, 2003
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,293
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page