OutOfMemoryException in service but not in application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a C# app which calls the RTC 1.3 API through the interop wrapper.
The app will make a large number of logins for different users.

If I run it as a standalone app, it is fine and that I can make more than
1000 logins.
But if I run as a Windows service, I will get OutOfMemoryException always
around at 420 logins.

System.OutOfMemoryException: Not enough storage is available to complete
this operation.
at RTCCore.RTCClientClass.InitializeEx(Int32 lFlags)

What could be the difference between running as a service and a standalone
app?
Both run under the same user account.

Thanks.
 
I use srvany.exe to run the app as service. It has OutOfMemoryException in
the same place. It looks like the context / environment is really different
in a service.
I try force GC but it does not help.
 
Back
Top