I can seem to find a definitive answer on this subject. I'm aware of the using() { } problem with the client proxy. But we have a client that is eating all exceptions returned by our service, and it seems like after the exception occurs, the client isn't able to communicate with the service anymore (we get no results in our service traces). The client is a web application (.NET 3.5). Has anyone experience this behavior?
Here is the client code:
public static bool ValidateDigitalSignatureCredentials(string barNumber, string PIN)
{
UserInfo userTicket = JTAC.INcite.Framework.Security.Authentication.CurrentUser;
DigitalSigning.DigitalSignatureClient client = null;
bool validSigning = false;
try
{
client = new DigitalSigning.DigitalSignatureClient();
client.ClientCredentials.UserName.UserName = "foo";
client.ClientCredentials.UserName.Password = "bar";
validSigning = client.VerifyCredentials(barNumber, PIN);
if (client.State != CommunicationState.Faulted)
{
client.Close(); // (timeout);
}
else
{
client.Abort();
}
}
catch (CommunicationException)
{
client.Abort();
}
catch (TimeoutException)
{
client.Abort();
}
return validSigning;
}