Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Is the information in WCF Error Handling any use? –  Andrew Morton Sep 26 at 21:40

2 Answers 2

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. Als switch custom errors off or set them to "Remote only".

<configuration>
    <system.web>
        <customErrors mode="Off" />
        <compilation debug="true" />
    </system.web>
</configuration>
share|improve this answer

Try this in your service behavior in web.config:

 <behavior name="Your.Service.Type">
    <serviceMetadata httpGetEnabled="true"/>
    <serviceDebug includeExceptionDetailInFaults="true"/>
 </behavior>
share|improve this answer
    
What is "Your.Service.Type"? –  BetaRide Jul 11 '12 at 7:37
    
Mmmm... according to msdn.microsoft.com/en-us/library/dayb112d.aspx there's no <behavior> tag. Where should I put this? –  BetaRide Jul 11 '12 at 7:44
    
It's in this path: <configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <serviceDebug includeExceptionDetailInFaults="true"/> –  MichelZ Jul 11 '12 at 8:07
    
I managed to add this to the web.config. Unfortunately it breaks the service completely request to the webserver are not answered anymore. –  BetaRide Jul 11 '12 at 8:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.