Sidharth
Sidharth

Reputation: 1251

Windows service for WCF Stops

I have a WCF application hosted as a windows service. This windows service triggers this WCF every 15 minutes. But when an exception occurs in this WCF the service is getting stopped.

I don't want this service to stop. I want to some how handle this exception and trigger this WCF after another 15 minutes.

Upvotes: 1

Views: 286

Answers (2)

Johann Blais
Johann Blais

Reputation: 9469

You should handle exceptions in all your service operations in order to:

  • Return nice faults to the caller
  • Prevent the service from failing miserably

Put a try/catch around every operation or use a custom behavior to handle all exceptions coming from your service

Upvotes: 1

Zephyr
Zephyr

Reputation: 7823

Look for the ServiceHost.Open(...) and put a try/catch around it perhaps.

Upvotes: 1

Related Questions