I have a WCF service that has been running for a long time now. I recently made some changes and it works fine locally but crashes with this message server side (only for the method that I changed, all other methods work fine)
Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
The problem is I have no way to debug the problem as it is only failing on the server. More frustrating, I know exactly where the code is failing I just can't tell why because I can never pull the exception data. Here is the method that is being hit in the WCF service.
public bool GenerateSpec(string product)
{
specService.GenerateSpec(product);
return true;
}
Which then calls this.
public bool GenerateSpec(string productNumber)
{
try
{
SessionFactory factory = new SessionFactory();
Session = factory.CreateSession(DataConnection.PM);
productService = new ProductService(Session);
// other code
return true;
}
catch (Exception e)
{
emailService.SendMessage(e.Message + "\n\n" + e.StackTrace);
return false;
}
}
I know it fails at the Session = factory.CreateSession(DataConnection.PM);
line but don't know why and it seems to just be ignoring my try catch block and dying anyways. What could be going on?