lost web method call after several submit

L

Linda Chen

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)
{
... }
}
}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top