WCF Exception displays local machine directory RRS feed

  • Question

  • Hi.

    I have deployed a WCF Service in another server in IIS. However, when an exception rises, I will be able to see the line of the error and the file name (in which directory etc...)

    System.ServiceModel.FaultException: System.Net.WebException: The request failed with HTTP status 503: Service Temporarily Unavailable. 
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) 
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
       at IncidentRequest_04Service.Get(String incidentnumber, Nullable`1 lookupdate, Boolean lookupdateSpecified, String version, String transactiontype) in C:\Users\myuser\Documents\Visual Studio 2010\Projects\ConsoleMgmt\WCF\Web References\IncidentRequest\Reference.cs:line 91 
       at TaskManagementService.TaskMgmtService.RetrieveIncident(String incidentNumber) in C:\Users\myuser\Documents\Visual Studio 2010\Projects\ConsoleMgmt\WcfIncidentService\TaskMgmtService.svc.cs:line 45 

    Is there a way to prevent that?

    Wednesday, July 3, 2013 1:03 PM


  • Set serviceDebug includeExceptionDetailInFaults="false" in Web.config.

    <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
    <serviceDebug includeExceptionDetailInFaults="false"/>

    Apriori algorithm [association rule]

    • Marked as answer by okdreamy Thursday, July 4, 2013 7:03 AM
    Wednesday, July 3, 2013 1:29 PM