I am frustrated with this WCF fault handling problem. I've been researching it for 3 days now and don't seem to be any closer to a solution.
I found what I thought was the answer at How to heal faulted WCF channels? and at Disposing of WCF Clients but I've not been able to make it work in my environment. I'm using VB.NET 4.0 and trying to communicate with a vendors' server. They provided the wsdl and xsd files which svcutil turned into a proxy class that I have incorporated into my program.
Thus far, I have been successful in getting through the security stuff and in implementing 13 of the 14 endpoints. These seem to work fine. The one that doesn't work returns a State property of Created when the Client is instantiated:
Dim Client = New InquireBillingInvoiceDetailsPortTypeClient(ConfigName, AppEndPoint)
If Client.State = CommunicationState.Opened Then
Client.Open()
' Code I'm not getting to
Else
Client.Abort()
Client = Nothing
End If
I understand that channels can fault but I don't understand why it is so difficult to clear the faulted condition after the fault condition has been corrected.
I am not getting anything in the traces either. There is no communication between the Client and the Server for this service like there is with the other endpoints. Shouldn't there be something in the svclog file related to this instantiation? This may be overkill but I'm including relevant portions of the app.config file here also. Any help would be greatly appreciated.
<basicHttpBinding>
<binding name="InquireBillingInvoiceDetailsSoapHttpBinding"
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384" maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
</binding>
</basicHttpBinding>
<client>
<endpoint address="https://.../InquireBillingInvoiceDetails.jws"
behaviorConfiguration="endPointCredentialBehavior"
binding="basicHttpBinding"
bindingConfiguration="InquireBillingInvoiceDetailsSoapHttpBinding"
contract="InquireBillingInvoiceDetailsPortType"
name="InquireBillingInvoiceDetailsSoapHttpPort" />
</client>
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
propagateActivity="true">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging"
switchValue="All" >
<listeners>
<add name="xml" />
</listeners>
</sources>
<sharedListeners>
<add name="xml"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="U:\logs\Traces.svclog" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>