tags:

views:

199

answers:

3

I have a WCF service, hosted in IIS returning the following error (when trying to call a method or even just browse to the service definition):

"Service not available"

The error log shows a bit more detail:

An unhandled exception occurred and the process was terminated.

Application ID: /LM/w3svc/1/ROOT/C_wcfService

Process ID: 4696

Exception: System.Runtime.InteropServices.SEHException

Message: External component has thrown an exception.

Can anyone point me in the right direction to fix this problem?

+1  A: 

Try recycling the AppPool that is hosting the service (an iisreset will work as well but is more invasive). Without more information it is hard to say what is wrong but recycling the AppPool will at least fix the immediate problem.

Andrew Hare
A: 

This problem was being caused b the Execute Permissions in IIS. The virutual directory was set to "Scripts only" and changing this to "Scripts and Executables" has resolved the issue. I'm not sure how you're supposed to get to this answer from the original error (but fiddling for a while seems to work!)

Sohnee
A: 

Message: External component has thrown an exception.

Doesn't seem to be the WCF service that's at fault here.....

We'd need a few more bits and pieces to see what's going on:

  • service web.config
  • service contract (for InstanceContextMode etc.)
  • how do you try to call your service? Client's config would be helpful, too.

Marc

marc_s