Can I make Asp program sleep?

Discussion in 'ASP General' started by c676228, Nov 20, 2008.

  1. c676228

    c676228 Guest

    Hi all,

    We use Payflow Pro from Verisign(Now it calls paypal Payflow Pro) as a
    gateway software to process credit card payment.

    Most of time, Paypal server is OK and we don't have problems for credit card
    payment. But we do experience some issues sometimes.
    i.e. Occasionally, after credit card information was submitted to payPal
    server, we didn't get any response from their server, no error code, it is
    just an empty string.

    I am not sure how it happened. I am thinking it's probably caused by our
    server program not waiting long enough for their server's response if their
    server has some performance issue(slow in response) at that time. When the
    server response is not back yet, our program goes forward already, then cause
    the return string from their server is empty. Am I on the right track?

    That's why I am thinking to make our asp program sleep for a while at this
    statement:

    Executor.Application = sDosCmd 'this command basically has credit card
    info for processing
    sResult=Executor.ExecuteDosApp 'sResult is the string back from paypal server

    I want to add sleep 3000 right after this statement.
    then check is sResult is empty, if not, program goes on. If yes, continue to
    sleep...
    until a non-empty string returns or quit the transaction after a long enough
    waiting.

    Would you like to share some your experiences of credit card transactions? I
    am dealing with a production server, so it is a very critical issue for us.

    I googled a bit. It says on ServerObejcts.com it has waitfor 1.0 we can
    download.
    I don't see this product.

    Thank you,
    --
    Betty
    c676228, Nov 20, 2008
    #1
    1. Advertising

  2. c676228

    Bob Barrows Guest

    No.

    c676228 wrote:
    > Hi all,
    >
    > We use Payflow Pro from Verisign(Now it calls paypal Payflow Pro) as a
    > gateway software to process credit card payment.
    >
    > Most of time, Paypal server is OK and we don't have problems for
    > credit card payment. But we do experience some issues sometimes.
    > i.e. Occasionally, after credit card information was submitted to
    > payPal server, we didn't get any response from their server, no error
    > code, it is just an empty string.
    >
    > I am not sure how it happened. I am thinking it's probably caused by
    > our server program not waiting long enough for their server's
    > response if their server has some performance issue(slow in response)
    > at that time. When the server response is not back yet, our program
    > goes forward already, then cause the return string from their server
    > is empty. Am I on the right track?
    >
    > That's why I am thinking to make our asp program sleep for a while at
    > this statement:
    >
    > Executor.Application = sDosCmd 'this command basically has credit
    > card
    > info for processing
    > sResult=Executor.ExecuteDosApp 'sResult is the string back from
    > paypal server
    >
    > I want to add sleep 3000 right after this statement.
    > then check is sResult is empty, if not, program goes on. If yes,
    > continue to sleep...
    > until a non-empty string returns or quit the transaction after a long
    > enough waiting.
    >
    > Would you like to share some your experiences of credit card
    > transactions? I am dealing with a production server, so it is a very
    > critical issue for us.
    >
    > I googled a bit. It says on ServerObejcts.com it has waitfor 1.0 we
    > can download.
    > I don't see this product.
    >
    > Thank you,
    > --
    > Betty


    --
    HTH,
    Bob Barrows
    Bob Barrows, Nov 20, 2008
    #2
    1. Advertising

  3. c676228

    Evertjan. Guest

    Bob Barrows wrote on 20 nov 2008 in
    microsoft.public.inetserver.asp.general:

    >> Can I make Asp program sleep?


    > No.


    Perhaps yes, Bob,

    Does this wait for 100 millisecs, or till the theString is not empty?

    [jscript]
    var endTime = new Date() + 100
    do {
    now get fresh value for theString;
    } while (theString=="" && endTime > new Date());

    [not!!! tested]

    It would be much better to have the client do new AJAX requests for some
    time, until the answer is in, freeing the server from any waiting.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Nov 20, 2008
    #3
  4. c676228

    Bob Barrows Guest

    Evertjan. wrote:
    > Bob Barrows wrote on 20 nov 2008 in
    > microsoft.public.inetserver.asp.general:
    >
    >>> Can I make Asp program sleep?

    >
    >> No.

    >
    > Perhaps yes, Bob,
    >
    > Does this wait for 100 millisecs, or till the theString is not empty?
    >
    > [jscript]
    > var endTime = new Date() + 100
    > do {
    > now get fresh value for theString;
    > } while (theString=="" && endTime > new Date());
    >
    > [not!!! tested]
    >

    That is not sleeping, but you know that.
    --
    HTH,
    Bob Barrows
    Bob Barrows, Nov 20, 2008
    #4
  5. c676228

    Evertjan. Guest

    Bob Barrows wrote on 20 nov 2008 in
    microsoft.public.inetserver.asp.general:

    > Evertjan. wrote:
    >> Bob Barrows wrote on 20 nov 2008 in
    >> microsoft.public.inetserver.asp.general:
    >>
    >>>> Can I make Asp program sleep?

    >>
    >>> No.

    >>
    >> Perhaps yes, Bob,
    >>
    >> Does this wait for 100 millisecs, or till the theString is not empty?
    >>
    >> [jscript]
    >> var endTime = new Date() + 100
    >> do {
    >> now get fresh value for theString;
    >> } while (theString=="" && endTime > new Date());
    >>
    >> [not!!! tested]
    >>

    > That is not sleeping, but you know that.


    That is just a question of semantics, Bob, of definition.

    The many parallel tasks of the OS are distributed anyway, so if a single
    task is not given the right priority, there is no or not much difference
    with a central task distributing loop that incorporates sleep timeouts.

    Only in a badly designed OS, such loops take too much of the processing
    time pool.

    Perhaps they are badly designed anyway.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Nov 20, 2008
    #5
  6. c676228

    Steven Cheng Guest

    Hi Betty,

    Have you got any progress on this issue?

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    -=----------------------------
    >From: =?Utf-8?B?YzY3NjIyOA==?= <>
    >Subject: Can I make Asp program sleep?
    >Date: Thu, 20 Nov 2008 11:20:01 -0800


    >
    >Hi all,
    >
    >We use Payflow Pro from Verisign(Now it calls paypal Payflow Pro) as a
    >gateway software to process credit card payment.
    >
    >Most of time, Paypal server is OK and we don't have problems for credit

    card
    >payment. But we do experience some issues sometimes.
    >i.e. Occasionally, after credit card information was submitted to payPal
    >server, we didn't get any response from their server, no error code, it is
    >just an empty string.
    >
    >I am not sure how it happened. I am thinking it's probably caused by our
    >server program not waiting long enough for their server's response if

    their
    >server has some performance issue(slow in response) at that time. When the
    >server response is not back yet, our program goes forward already, then

    cause
    >the return string from their server is empty. Am I on the right track?
    >
    >That's why I am thinking to make our asp program sleep for a while at this
    >statement:
    >
    > Executor.Application = sDosCmd 'this command basically has credit card
    >info for processing
    > sResult=Executor.ExecuteDosApp 'sResult is the string back from paypal

    server
    >
    >I want to add sleep 3000 right after this statement.
    >then check is sResult is empty, if not, program goes on. If yes, continue

    to
    >sleep...
    >until a non-empty string returns or quit the transaction after a long

    enough
    >waiting.
    >
    >Would you like to share some your experiences of credit card transactions?

    I
    >am dealing with a production server, so it is a very critical issue for us.
    >
    >I googled a bit. It says on ServerObejcts.com it has waitfor 1.0 we can
    >download.
    >I don't see this product.
    >
    >Thank you,
    >--
    >Betty
    >
    Steven Cheng, Nov 25, 2008
    #6
  7. "c676228" <> wrote in message
    news:...
    > Hi all,
    >
    > We use Payflow Pro from Verisign(Now it calls paypal Payflow Pro) as a
    > gateway software to process credit card payment.
    >
    > Most of time, Paypal server is OK and we don't have problems for credit
    > card
    > payment. But we do experience some issues sometimes.
    > i.e. Occasionally, after credit card information was submitted to payPal
    > server, we didn't get any response from their server, no error code, it is
    > just an empty string.
    >
    > I am not sure how it happened. I am thinking it's probably caused by our
    > server program not waiting long enough for their server's response if
    > their
    > server has some performance issue(slow in response) at that time. When the
    > server response is not back yet, our program goes forward already, then
    > cause
    > the return string from their server is empty. Am I on the right track?
    >
    > That's why I am thinking to make our asp program sleep for a while at this
    > statement:
    >
    > Executor.Application = sDosCmd 'this command basically has credit card
    > info for processing
    > sResult=Executor.ExecuteDosApp 'sResult is the string back from paypal
    > server
    >
    > I want to add sleep 3000 right after this statement.
    > then check is sResult is empty, if not, program goes on. If yes, continue
    > to
    > sleep...
    > until a non-empty string returns or quit the transaction after a long
    > enough
    > waiting.
    >


    What is Executor?

    Are you saying you want something like this:-

    Dim sResult : sResult = ""
    sResult = Executor.ExecuteDosApp
    Do While sResult = ""
    'Sleep here
    sResult = Executor.ExecuteDosApp
    Loop

    It would look like you would be calling ExecuteDosApp multiple times, the
    name of the method would seem to indicate that would not be good.

    Are you sure that ExecuteDosApp doesn't block or have a blocking version
    that waits for the spawned process to complete?

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Nov 25, 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. Gonzalo Moreno
    Replies:
    2
    Views:
    12,408
  2. opalpa  http://opalpa.info
    Replies:
    0
    Views:
    365
    opalpa http://opalpa.info
    Oct 30, 2006
  3. Sam Roberts
    Replies:
    16
    Views:
    374
    Daniel Berger
    Feb 18, 2005
  4. Richard
    Replies:
    7
    Views:
    224
    Richard
    May 22, 2007
  5. Alexander Erlich

    How can I let the program wait/sleep?

    Alexander Erlich, Jun 1, 2005, in forum: Javascript
    Replies:
    4
    Views:
    117
    Dr John Stockton
    Jun 2, 2005
Loading...

Share This Page