RE: OutOfMemoryException: Webservice, DataSet and file transport

From: Tom De ceuster (TomDeceuster_at_discussions.microsoft.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 08:15:07 -0700

Pieter,

Calling the web service from a desktop pc gives no problems. What I want to
achieve with the web method is updating the software. Actually, it also
updates the database file of an oracle Lite database. But in my case this
isn't the issue.

I think, that when the soap-xml is tranformed to a DataSet with a large byte
array there's a buffer problem at a certain size of the byte array. I have
noticed some reading functions, when you use a high value for the number of
elements, you get also an OutOfMemoryException. Reading in chunks gives a
solution to this problem.
Especially on the compact framework 1.0 (SP2).

Tom

"Pieter" wrote:

> Tom,
>
> Did you try calling the webservice from a desktop pc?
>
> One thing I know about datasets is that they tend to consume a lot of memory
> and can take a long time to load.
>
> Maybe you can explain what you're trying to achieve with your application.
>
> Pieter
>
> "Tom De ceuster" wrote:
>
> > Pieter,
> >
> > I keep the dataset in memory. I don't use the SQL server CE database.
> > I get the memory Exception before the webservice method returns.
> >
> > regards,
> > Tom
> >
> > "Pieter" wrote:
> >
> > > Tom,
> > >
> > > Do you keep this dataset in memory? Or are you using it to feed a SQL Server
> > > CE database? In the latter case I experienced a similar problem that was
> > > caused by a SqlCeCommand object that wasn't disposed after using it.
> > >
> > > regards,
> > > Pieter
> > >
> > >
> > >
> > > "Tom De ceuster" wrote:
> > >
> > > > Hi,
> > > >
> > > > For transportation of a file, approx 850kB, I use a webservice which return
> > > > a dataset with one DataTable and a row. That row holds the file. After a
> > > > while I get an OutOfMemoryException on my Pocket PC device. The memory usage
> > > > increments exponential from 20MB -> 24MB, and my file is not that big.
> > > >
> > > > Is this a known problem with the Compact Framework 1.0 SP2, on a Windows CE
> > > > 4.2 device? Or by a certain memory allocation for the dataset?
> > > > Please any information is welcome.
> > > >
> > > > Regards,
> > > > Tom



Relevant Pages

  • Calling web service using SOAP
    ... I have created a web service which works fine when calling it from C#. ... In this I have a web method called ... public string GetMember ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: How to determine web service consumers
    ... How can I determine the name of the client app that is calling ... web service at runtime from the web method? ... Have the "client app" send its name to the service. ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: Asynchronous Web Service Method Failure
    ... this is an ASP page calling the ... >that pops up if the proxy can't reconcile the web method parameters. ... I cannot return a .pdf document object from a web service method ... >> On the server side, it's not a background thread any more than any other ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Please Help me- Creating Custom tokens-PLEASE HELP ME!!!!!!!!!!!!
    ... So before he his given access to the Web Method, ... > WSE on the Web Service first authenticates him against Active ... > Directory(Using UsernameTokenManagers- Authenticate Method). ... > is authenticated in the Web method before the response is sent I will ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Data table parameter in web services.
    ... So the webservice call is not hard-coded but for example ... which web service to use on a set of data. ... to execute and this string as a generic procdure that will execute the ... one of the web method, it does list it in IE, when i browse the asmx file, ...
    (microsoft.public.dotnet.framework.aspnet.webservices)