asynchronous asp.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Wagner

    asynchronous asp.net

    could somebody show me how to asynchronously call some methods from a web
    service? I'm kind of fuzzy on delegates, IAsyncResult, etc...

    1. web service is being called by outside source
    2. web service calls method "startProcessin g" in business layer
    a. fires off asynchronous method querying database and generating
    reports
    3. method "startProcessin g" returns a string indicating that report
    generation was started successfully.
    4. outside source may come back to query the status of the report generation
    (I would probably look at the db for that information) but not essential.

    some pseudo code with the important elements would be great!

    Thanks!


  • bruce barker

    #2
    Re: asynchronous asp.net

    you web service has two method calls

    startProcessing , which validates the input, starts a thread to do the work,
    then returns
    checkStatus, which returns the status of the process, and if done, the
    results


    note: to prevent denial of service attacks, you should use a pool of threads
    and track the number of concurrent requests.

    -- bruce (sqlwork.com)




    "Alex Wagner" <gb11111@hot-nospam-mail.com> wrote in message
    news:uOwxXk#IEH A.2376@TK2MSFTN GP12.phx.gbl...[color=blue]
    > could somebody show me how to asynchronously call some methods from a web
    > service? I'm kind of fuzzy on delegates, IAsyncResult, etc...
    >
    > 1. web service is being called by outside source
    > 2. web service calls method "startProcessin g" in business layer
    > a. fires off asynchronous method querying database and generating
    > reports
    > 3. method "startProcessin g" returns a string indicating that report
    > generation was started successfully.
    > 4. outside source may come back to query the status of the report[/color]
    generation[color=blue]
    > (I would probably look at the db for that information) but not essential.
    >
    > some pseudo code with the important elements would be great!
    >
    > Thanks!
    >
    >[/color]


    Comment

    • Alex Wagner

      #3
      Re: asynchronous asp.net

      would you have code samples for that?


      "bruce barker" <nospam_brubar@ safeco.com> wrote in message
      news:%23sH2j7$I EHA.3104@TK2MSF TNGP10.phx.gbl. ..[color=blue]
      > you web service has two method calls
      >
      > startProcessing , which validates the input, starts a thread to do the[/color]
      work,[color=blue]
      > then returns
      > checkStatus, which returns the status of the process, and if done, the
      > results
      >
      >
      > note: to prevent denial of service attacks, you should use a pool of[/color]
      threads[color=blue]
      > and track the number of concurrent requests.
      >
      > -- bruce (sqlwork.com)
      >
      >
      >
      >
      > "Alex Wagner" <gb11111@hot-nospam-mail.com> wrote in message
      > news:uOwxXk#IEH A.2376@TK2MSFTN GP12.phx.gbl...[color=green]
      > > could somebody show me how to asynchronously call some methods from a[/color][/color]
      web[color=blue][color=green]
      > > service? I'm kind of fuzzy on delegates, IAsyncResult, etc...
      > >
      > > 1. web service is being called by outside source
      > > 2. web service calls method "startProcessin g" in business layer
      > > a. fires off asynchronous method querying database and generating
      > > reports
      > > 3. method "startProcessin g" returns a string indicating that report
      > > generation was started successfully.
      > > 4. outside source may come back to query the status of the report[/color]
      > generation[color=green]
      > > (I would probably look at the db for that information) but not[/color][/color]
      essential.[color=blue][color=green]
      > >
      > > some pseudo code with the important elements would be great!
      > >
      > > Thanks!
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...