Web service not responding for larger data

  • Thread starter Thread starter archana
  • Start date Start date
A

archana

Hi all,

I am facing some wierd problem in web service.

I have on web service with is accepting 3 dataset.

One dataset content of csv file. Size of csv file is 86MB.

But when i am calling web method it is not getting processed.

And after some time i am getting error :-

The underlying connection was closed: An unexpected error occurred on a
receive.

But if i run same thing with 28 MB file then it is working properly.

My web service is on another pc and client is on another pc.

i tried with increating size in web.config also. But of no success.

Can someone shed some light on this.

Please help me asap as this is very very important for me.

Thanks in advance.
 
86Mb is quite large for a web-service, particularly if this is loaded into
any object model.

It *sounds* like what you are doing is uploading a big CSV file; if this was
me, what I would do is something along the lines of:

Create a web-service along the lines of the below; this allows you to upload
the large file via a series of smaller steps - better fault tolerance, and
more ability to report progress to the user. More importantly, it avoids
having a damned *huge* array in memory at either end (which is probably the
main problem here), and means it never gets loaded into any object model
(XmlDocument, DataSet, etc).
Because of the byte[] param, this would work best with WSE3 / MTOM. I would
even consider using the Compression namespace to (programatically) shrink
the data on-the-fly (although IIS compression would also suit). The byte[]
approach is for total flexibility; you could use string chunks for csv, but
not for other types.

[WebMethod]
public int StartUpload({some metadata}) {
// return some token for a new file; could be the (string) path on the
server, but I prefer to abstract this
}

[WebMethod]
public void UploadChunk(int token, int offset, byte[] data) {
// append this chunk to the file (via binary methods)
}

[WebMethod]
public void EndUpload(int token, bool commit) {
// if commit, simple finalise the file (perhaps move from %TEMP%); else
abort (delete the file)
}
 
Hi
thanks for your reply.

but then by sending data in the form of chunk, it will increase trips
between client and server.

Can you tell me maximim size which can be set to send data to server.

As well as maximum of how much data i can send to web service.

Any help will be truely apprecaited.

Thanks in advance.
 

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

Back
Top