Program Logic Question

Discussion in 'ASP General' started by Derek Timothy, Jun 30, 2003.

  1. Hello All,

    I have written a little VB program to send packets of data to my web server
    every 5 seconds in the form of a small csv file. The idea is to have a live
    (or almost live) "call status" web page running in ASP making use of the
    data in the csv file.

    So what I have done it to write a service in VB on the server that looks for
    the csv file every 5 seconds and if it is found it creates a new asp page
    with an autorefresh meta tag and copies it to wwwroot. It is virtually live
    and my manager from anywhere in the world can see the status of service
    calls.

    I think it is a good idea but my programs hang after half an hour and I am
    beginning to wonder if I have some sort of locking issue or if I am going
    about this the right way.

    I had thought of scrapping the service part altogether and just using a
    single ASP page with an autorefresh that reads in the csv file data using
    the FileSystem object, but surely that could be at risk of locking problems
    as well (if the FTP were trying to overwrite the existing file, while the
    asp page is trying to read it). Perhaps not, I'm not sure. Really I'm just
    looking for re-assurance that my new idea will work before I go too far down
    the wrong path. If not, any other ideas or tips would be much appreciated.

    Best Regards,
    Derek
     
    Derek Timothy, Jun 30, 2003
    #1
    1. Advertising

  2. "Derek Timothy" <> wrote in message
    news:...
    > Hello All,
    >
    > I have written a little VB program to send packets of data to my web

    server
    > every 5 seconds in the form of a small csv file. The idea is to have a

    live
    > (or almost live) "call status" web page running in ASP making use of the
    > data in the csv file.
    >
    > So what I have done it to write a service in VB on the server that looks

    for
    > the csv file every 5 seconds and if it is found it creates a new asp page
    > with an autorefresh meta tag and copies it to wwwroot. It is virtually

    live
    > and my manager from anywhere in the world can see the status of service
    > calls.
    >
    > I think it is a good idea but my programs hang after half an hour and I am
    > beginning to wonder if I have some sort of locking issue or if I am going
    > about this the right way.
    >
    > I had thought of scrapping the service part altogether and just using a
    > single ASP page with an autorefresh that reads in the csv file data using
    > the FileSystem object, but surely that could be at risk of locking

    problems
    > as well (if the FTP were trying to overwrite the existing file, while the
    > asp page is trying to read it). Perhaps not, I'm not sure. Really I'm just
    > looking for re-assurance that my new idea will work before I go too far

    down
    > the wrong path. If not, any other ideas or tips would be much appreciated.
    >
    > Best Regards,
    > Derek
    >


    maybe a memory leak in your VB app? Task manager - Performance tab will
    show you if this is the case. Maybe the event log can tell you what is
    happening? Personally I would have chosen the .asp and filesystemobject
    route myself. Easy enough to tell if the file is locked for updating and try
    again later.


    --
    John Blessing
    http://www.LbeHelpdesk.com - Help Desk software at affordable prices
    http://www.free-helpdesk.com - Completely free help desk software !
    http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
    http://www.lbesync.com - Synchronize two Outlook Personal Folders
     
    John Blessing, Jul 1, 2003
    #2
    1. Advertising

  3. I would agree, it sounds like you are using more and more memory without
    releasing it. If you are using array's and whatnot make sure to kill
    them once you are done with em.

    hth,
    Andrew

    * * * Sent via DevBuilder http://www.devbuilder.org * * *
    Developer Resources for High End Developers.
     
    Andrew Durstewitz, Jul 1, 2003
    #3
  4. John,

    Thanks for the reassurance, I'll check the vb app to make sure I destroy the
    objects cleanly and I'll give the ASP route a try.

    You mention that it is easy enough to check if the file is locked for
    update. Can you tell me how to check this?

    Many thanks in advance.
    Best Regards,
    Derek


    "John Blessing" <ntlnews@**REMOVETHIS**lbehelpdesk.com> wrote in message
    news:24fMa.797$...
    > "Derek Timothy" <> wrote in message
    > news:...
    > > Hello All,
    > >
    > > I have written a little VB program to send packets of data to my web

    > server
    > > every 5 seconds in the form of a small csv file. The idea is to have a

    > live
    > > (or almost live) "call status" web page running in ASP making use of the
    > > data in the csv file.
    > >
    > > So what I have done it to write a service in VB on the server that looks

    > for
    > > the csv file every 5 seconds and if it is found it creates a new asp

    page
    > > with an autorefresh meta tag and copies it to wwwroot. It is virtually

    > live
    > > and my manager from anywhere in the world can see the status of service
    > > calls.
    > >
    > > I think it is a good idea but my programs hang after half an hour and I

    am
    > > beginning to wonder if I have some sort of locking issue or if I am

    going
    > > about this the right way.
    > >
    > > I had thought of scrapping the service part altogether and just using a
    > > single ASP page with an autorefresh that reads in the csv file data

    using
    > > the FileSystem object, but surely that could be at risk of locking

    > problems
    > > as well (if the FTP were trying to overwrite the existing file, while

    the
    > > asp page is trying to read it). Perhaps not, I'm not sure. Really I'm

    just
    > > looking for re-assurance that my new idea will work before I go too far

    > down
    > > the wrong path. If not, any other ideas or tips would be much

    appreciated.
    > >
    > > Best Regards,
    > > Derek
    > >

    >
    > maybe a memory leak in your VB app? Task manager - Performance tab will
    > show you if this is the case. Maybe the event log can tell you what is
    > happening? Personally I would have chosen the .asp and filesystemobject
    > route myself. Easy enough to tell if the file is locked for updating and

    try
    > again later.
    >
    >
    > --
    > John Blessing
    > http://www.LbeHelpdesk.com - Help Desk software at affordable prices
    > http://www.free-helpdesk.com - Completely free help desk software !
    > http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
    > http://www.lbesync.com - Synchronize two Outlook Personal Folders
    >
     
    Derek Timothy, Jul 1, 2003
    #4
  5. Andrew,

    Thanks for the tip. I'll check out the VB app and make sure I cleanly
    destroy the objects.

    All the best,
    Derek

    "Andrew Durstewitz" <> wrote in message
    news:3f018c01$0$198$...
    > I would agree, it sounds like you are using more and more memory without
    > releasing it. If you are using array's and whatnot make sure to kill
    > them once you are done with em.
    >
    > hth,
    > Andrew
    >
    > * * * Sent via DevBuilder http://www.devbuilder.org * * *
    > Developer Resources for High End Developers.
     
    Derek Timothy, Jul 1, 2003
    #5
  6. Derek Timothy

    Tim Williams Guest

    Are you sending too much data to just stuff it in a querystring and send it
    directly to an ASP page which can create the "static" page?
    That would save you from having to run another VB component on the
    server....

    tim


    "Derek Timothy" <> wrote in message
    news:...
    > Hello All,
    >
    > I have written a little VB program to send packets of data to my web

    server
    > every 5 seconds in the form of a small csv file. The idea is to have a

    live
    > (or almost live) "call status" web page running in ASP making use of the
    > data in the csv file.
    >
    > So what I have done it to write a service in VB on the server that looks

    for
    > the csv file every 5 seconds and if it is found it creates a new asp page
    > with an autorefresh meta tag and copies it to wwwroot. It is virtually

    live
    > and my manager from anywhere in the world can see the status of service
    > calls.
    >
    > I think it is a good idea but my programs hang after half an hour and I am
    > beginning to wonder if I have some sort of locking issue or if I am going
    > about this the right way.
    >
    > I had thought of scrapping the service part altogether and just using a
    > single ASP page with an autorefresh that reads in the csv file data using
    > the FileSystem object, but surely that could be at risk of locking

    problems
    > as well (if the FTP were trying to overwrite the existing file, while the
    > asp page is trying to read it). Perhaps not, I'm not sure. Really I'm just
    > looking for re-assurance that my new idea will work before I go too far

    down
    > the wrong path. If not, any other ideas or tips would be much appreciated.
    >
    > Best Regards,
    > Derek
    >
    >
    >
    >
    >
     
    Tim Williams, Jul 2, 2003
    #6
  7. Tim,

    I'm certainly not sending a lot of data and I hadn't considered this option,
    how would it work?

    TIA,
    Derek



    "Tim Williams" <> wrote in message
    news:...
    > Are you sending too much data to just stuff it in a querystring and send

    it
    > directly to an ASP page which can create the "static" page?
    > That would save you from having to run another VB component on the
    > server....
    >
    > tim
    >
    >
    > "Derek Timothy" <> wrote in message
    > news:...
    > > Hello All,
    > >
    > > I have written a little VB program to send packets of data to my web

    > server
    > > every 5 seconds in the form of a small csv file. The idea is to have a

    > live
    > > (or almost live) "call status" web page running in ASP making use of the
    > > data in the csv file.
    > >
    > > So what I have done it to write a service in VB on the server that looks

    > for
    > > the csv file every 5 seconds and if it is found it creates a new asp

    page
    > > with an autorefresh meta tag and copies it to wwwroot. It is virtually

    > live
    > > and my manager from anywhere in the world can see the status of service
    > > calls.
    > >
    > > I think it is a good idea but my programs hang after half an hour and I

    am
    > > beginning to wonder if I have some sort of locking issue or if I am

    going
    > > about this the right way.
    > >
    > > I had thought of scrapping the service part altogether and just using a
    > > single ASP page with an autorefresh that reads in the csv file data

    using
    > > the FileSystem object, but surely that could be at risk of locking

    > problems
    > > as well (if the FTP were trying to overwrite the existing file, while

    the
    > > asp page is trying to read it). Perhaps not, I'm not sure. Really I'm

    just
    > > looking for re-assurance that my new idea will work before I go too far

    > down
    > > the wrong path. If not, any other ideas or tips would be much

    appreciated.
    > >
    > > Best Regards,
    > > Derek
    > >
    > >
    > >
    > >
    > >

    >
    >
     
    Derek Timothy, Jul 2, 2003
    #7
  8. Derek Timothy

    Tim Williams Guest

    If you can just create a single string containing all of your data (joined
    with appropriate delimitors and urlencoded) then you can send it to your ASP
    page using the xmlhttp component and a GET request.

    eg:

    GET: update.asp?info=blahblahblah

    the asp page just reformats the value of request.querystring("info") and
    using the FSO either overwrites the existing "static" page with the new info
    or overwrites an include file used in the static page. That way you don't
    need a component on the server.

    Tim




    "Derek Timothy" <> wrote in message
    news:uk#...
    > Tim,
    >
    > I'm certainly not sending a lot of data and I hadn't considered this

    option,
    > how would it work?
    >
    > TIA,
    > Derek
    >
    >
    >
    > "Tim Williams" <> wrote in message
    > news:...
    > > Are you sending too much data to just stuff it in a querystring and send

    > it
    > > directly to an ASP page which can create the "static" page?
    > > That would save you from having to run another VB component on the
    > > server....
    > >
    > > tim
    > >
    > >
    > > "Derek Timothy" <> wrote in message
    > > news:...
    > > > Hello All,
    > > >
    > > > I have written a little VB program to send packets of data to my web

    > > server
    > > > every 5 seconds in the form of a small csv file. The idea is to have a

    > > live
    > > > (or almost live) "call status" web page running in ASP making use of

    the
    > > > data in the csv file.
    > > >
    > > > So what I have done it to write a service in VB on the server that

    looks
    > > for
    > > > the csv file every 5 seconds and if it is found it creates a new asp

    > page
    > > > with an autorefresh meta tag and copies it to wwwroot. It is virtually

    > > live
    > > > and my manager from anywhere in the world can see the status of

    service
    > > > calls.
    > > >
    > > > I think it is a good idea but my programs hang after half an hour and

    I
    > am
    > > > beginning to wonder if I have some sort of locking issue or if I am

    > going
    > > > about this the right way.
    > > >
    > > > I had thought of scrapping the service part altogether and just using

    a
    > > > single ASP page with an autorefresh that reads in the csv file data

    > using
    > > > the FileSystem object, but surely that could be at risk of locking

    > > problems
    > > > as well (if the FTP were trying to overwrite the existing file, while

    > the
    > > > asp page is trying to read it). Perhaps not, I'm not sure. Really I'm

    > just
    > > > looking for re-assurance that my new idea will work before I go too

    far
    > > down
    > > > the wrong path. If not, any other ideas or tips would be much

    > appreciated.
    > > >
    > > > Best Regards,
    > > > Derek
    > > >
    > > >
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Tim Williams, Jul 2, 2003
    #8
  9. Tim,

    This is an excellent idea, I really hadn't thought of this. It would avoid
    me having to use the Internet Transfer control and FTP, it always seems a
    bit flakey. Thanks a lot for this suggestion, I'm going to give it a go.

    All the best,
    Derek


    "Tim Williams" <> wrote in message
    news:#k$...
    > If you can just create a single string containing all of your data (joined
    > with appropriate delimitors and urlencoded) then you can send it to your

    ASP
    > page using the xmlhttp component and a GET request.
    >
    > eg:
    >
    > GET: update.asp?info=blahblahblah
    >
    > the asp page just reformats the value of request.querystring("info") and
    > using the FSO either overwrites the existing "static" page with the new

    info
    > or overwrites an include file used in the static page. That way you don't
    > need a component on the server.
    >
    > Tim
    >
    >
    >
    >
    > "Derek Timothy" <> wrote in message
    > news:uk#...
    > > Tim,
    > >
    > > I'm certainly not sending a lot of data and I hadn't considered this

    > option,
    > > how would it work?
    > >
    > > TIA,
    > > Derek
    > >
    > >
    > >
    > > "Tim Williams" <> wrote in message
    > > news:...
    > > > Are you sending too much data to just stuff it in a querystring and

    send
    > > it
    > > > directly to an ASP page which can create the "static" page?
    > > > That would save you from having to run another VB component on the
    > > > server....
    > > >
    > > > tim
    > > >
    > > >
    > > > "Derek Timothy" <> wrote in message
    > > > news:...
    > > > > Hello All,
    > > > >
    > > > > I have written a little VB program to send packets of data to my web
    > > > server
    > > > > every 5 seconds in the form of a small csv file. The idea is to have

    a
    > > > live
    > > > > (or almost live) "call status" web page running in ASP making use of

    > the
    > > > > data in the csv file.
    > > > >
    > > > > So what I have done it to write a service in VB on the server that

    > looks
    > > > for
    > > > > the csv file every 5 seconds and if it is found it creates a new asp

    > > page
    > > > > with an autorefresh meta tag and copies it to wwwroot. It is

    virtually
    > > > live
    > > > > and my manager from anywhere in the world can see the status of

    > service
    > > > > calls.
    > > > >
    > > > > I think it is a good idea but my programs hang after half an hour

    and
    > I
    > > am
    > > > > beginning to wonder if I have some sort of locking issue or if I am

    > > going
    > > > > about this the right way.
    > > > >
    > > > > I had thought of scrapping the service part altogether and just

    using
    > a
    > > > > single ASP page with an autorefresh that reads in the csv file data

    > > using
    > > > > the FileSystem object, but surely that could be at risk of locking
    > > > problems
    > > > > as well (if the FTP were trying to overwrite the existing file,

    while
    > > the
    > > > > asp page is trying to read it). Perhaps not, I'm not sure. Really

    I'm
    > > just
    > > > > looking for re-assurance that my new idea will work before I go too

    > far
    > > > down
    > > > > the wrong path. If not, any other ideas or tips would be much

    > > appreciated.
    > > > >
    > > > > Best Regards,
    > > > > Derek
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Derek Timothy, Jul 3, 2003
    #9
    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. Chris Berg
    Replies:
    1
    Views:
    522
    Sudsy
    Nov 23, 2003
  2. RSB

    CRC check logic/program

    RSB, Sep 29, 2004, in forum: Java
    Replies:
    2
    Views:
    2,595
    Michael Borgwardt
    Sep 30, 2004
  3. JasBascom

    program logic

    JasBascom, Feb 15, 2004, in forum: C++
    Replies:
    1
    Views:
    372
    David Harmon
    Feb 15, 2004
  4. spike
    Replies:
    8
    Views:
    1,473
    Steve Holden
    Feb 9, 2010
  5. G G
    Replies:
    20
    Views:
    420
    Tim Rentsch
    Sep 23, 2013
Loading...

Share This Page