Turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the serviceDebug configuration behavior) on the server

0

I have an application that every 2 min calls a method of a WCF service but apparently there were connection problems in the first two attempts it returned the following:

  

An error occurred while receiving the HTTP response to    link . This could be due to the service   endpoint binding not using the HTTP protocol. This could also be due   to an HTTP request context being aborted by the server (possibly due   to the service shutting down). See server logs for more details.

After those two attempts he returned the following:

  

The server was unable to process the request due to an internal   error. For more information about the error, either turn on   IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute   or from the configuration behavior) on the server in   order to send the exception information back to the client, or turn on   tracing as per the Microsoft .NET Framework SDK documentation and   inspect the server trace logs.

Search in google and they explain that I have to activate the IncludeExceptionDetailInFaults but I do not finish to understand how to do it and that is my doubt.

I leave the app.config of the application.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="OfflineService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
            <section name="Service.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="OfflineService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>



    <applicationSettings>
        <OfflineService.Properties.Settings>
            <setting name="Time" serializeAs="String">
                <value>120000</value>
            </setting>
        </OfflineService.Properties.Settings>
    </applicationSettings>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IService" closeTimeout="00:01:00" receiveTimeout="00:30:00" sendTimeout="00:30:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
                  <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
                  <security mode="Transport">
                    <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
                    <message clientCredentialType="UserName" algorithmSuite="Default"/>
                  </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://xxxx.xxx.xx/Service.svc" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_IService" contract="ServiceReference.IService"
                name="BasicHttpBinding_IService" />
        </client>
    </system.serviceModel>
    <userSettings>
        <OfflineService.Properties.Settings>
            <setting name="Folder" serializeAs="String">
                <value>C:\log\</value>
            </setting>
        </OfflineService.Properties.Settings>
    </userSettings>
</configuration>

Thank you very much already.

Greetings.

    
asked by Dario Nicolas Orazi 31.05.2018 в 21:16
source

0 answers