0

My ASP.NET SOAP Web Service is getting "Out of memory" run-time error after a few hundred calls. The "Out of Memory" issue is happening because of my using of a third-party component in my web service. To solve the "Out of Memory" issue I'd like to restart my web service from within itself when it captures "Out of memory" run-time error.

I have found how to restart a web service using a "hacking" solution "How to restart asp.net application besides modifying web.config".

Question: Is there any other more "elegant" non-hacking ways to restart an ASP.NET web service (both SOAP and Web API) from within itself by, e.g., using a special .NET Framework API call? I'm using .NET Framework 4.0+ in my web service.

Community
  • 1
  • 1
ShamilS
  • 1,410
  • 2
  • 20
  • 40
  • 1
    You want to kick the chair from under a running application, there's no way to call that elegant. Let the third-party component be fixed or just [try the various ways offered on this site](http://stackoverflow.com/questions/249927/restarting-recycling-an-application-pool). – CodeCaster Jul 22 '14 at 08:29
  • @CodeCaster: AFAIU the "ways offered on proposed site" do use external to a running Web Services restarting methods (am I wrong?) and I'm looking for internal ones. – ShamilS Jul 22 '14 at 20:41

0 Answers0