8

I have IIS set-up and serving my webservice. Unfortunately if the webservice throws an exception, all I get is a blue box with the title failed request.

What options do I have to actually see what went wrong? I'd prefer to get the exception message and a stack trace.

I already set-up "Failed Request Tracing" but the directory remains empty. If possible I'd prefer to get the stack trace in the browser directly.

Just if this matters: I have an IIS 7.5 on a Win 7 64 Pro box. The Webservice is a WCF C# project.

BetaRide
  • 435
  • 2
  • 10
  • 20
  • Is the information in [WCF Error Handling](http://msdn.microsoft.com/en-us/library/gg281715%28v=vs.110%29.aspx) any use? – Andrew Morton Sep 26 '14 at 21:40

2 Answers2

7

You will find the errors in the eventlog, but having them in the browser is indeed more convenient (especially during development). To do that: turn on debugging in your web.config. Also, switch custom errors off or set them to "Remote only".

<configuration>
    <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" />
    </system.web>
</configuration>
RBT
  • 223
  • 2
  • 10
Louis Somers
  • 616
  • 6
  • 15
0

Try this in your service behavior in web.config:

 <behavior name="Your.Service.Type">
    <serviceMetadata httpGetEnabled="true"/>
    <serviceDebug includeExceptionDetailInFaults="true"/>
 </behavior>
MichelZ
  • 11,008
  • 4
  • 30
  • 58