lost web method call after several submit

Discussion in 'ASP .Net Web Services' started by Linda Chen, Sep 26, 2003.

  1. Linda Chen

    Linda Chen Guest

    Hi all;

    I created an asp.net web service, which is written in
    VB.Net. This web service connect to a database, extract
    data and generate a xml file based on the data. the
    service also ftp the xml file the the destination.

    My asp.net web application connected to the web service is
    written in C#. From the web page I can enter my query
    parameters. "Submit" button calls the web method from the
    web service.

    Here is my problem:

    if I keep clicking on the submit button before the
    prevoius process is done, after several time I will lose
    my web service call. For example: if I click on the submit
    button 5 times, I may get only three xml files.
    HttpContext.Current.Trace only print out three logs too.

    The following is my sample code. Please help me to
    identify my problem. Sample code or URL are absolutely
    welcomed.

    Thanks a lot.

    //VB web service
    Public Class MyService
    Inherits System.Web.Services.WebService
    ......

    <Webmethod> public sub MyMethod
    SyncLock mobjLock
    If HttpContext.Current.Trace.IsEnabled Then
    HttpContext.Current.Trace.Write
    ("DataService", strLog)
    ' connect to db
    ' extract data
    ' build xml serialization collections
    ' write xml file
    ' ftp the file to destination
    If HttpContext.Current.Trace.IsEnabled Then
    HttpContext.Current.Trace.Write
    ("DataService", "ending conversion.")
    End If
    End SyncLock

    end sub

    end class

    //C# web form
    public class MyForm : System.Web.UI.Page
    {
    ......

    private void ButtSubmit_Click(object sender,
    System.EventArgs e)
    {
    try
    {
    MyService Ser = new MyService();

    AsyncCallback AsyncCallback = new AsyncCallback
    (ServiceCallback);
    Ser.BeginConversion(params..., AsyncCallback, Ser);

    }
    catch (Exception ex)
    {
    ... }
    }
    }
     
    Linda Chen, Sep 26, 2003
    #1
    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. davidw
    Replies:
    3
    Views:
    427
    Curt_C [MVP]
    Aug 27, 2004
  2. Anthony Frayling
    Replies:
    0
    Views:
    204
    Anthony Frayling
    Mar 5, 2004
  3. New Line Lost in Web Method Call

    , Nov 30, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    130
  4. Victor \Zverok\ Shepelev

    RDOC: several related modules in several C files

    Victor \Zverok\ Shepelev, Mar 6, 2007, in forum: Ruby
    Replies:
    3
    Views:
    188
    Max Lapshin
    Mar 16, 2007
  5. Robert Oschler
    Replies:
    7
    Views:
    119
Loading...

Share This Page