Missing or Malformed Service Bindings Can Hose ALL Your Service Calls

I learned something interesting yesterday. After we did a new production deployment at work for one of our websites, we ran into a few issues that hadn't occurred in QA or staging. The first was that, for some reason, calls from the website (which is an ASP.NET MVC 4.5 site) to one of our WCF services, was failing. The service in question is used to retrieve images from Sharepoint. Later, we found another issue, wherein attempts to contact a different service for the purposes of sending email were failing. As it turned out, the two issues, while seemingly unrelated, were caused by the exact same problem.

In addition to the endpoints for the two aforementioned services, our Web.config file also contained an endpoint for a third service, that is not yet in use, but is defined and in development. But somehow, the binding for this service didn't make it into the production version of the Web.config file, and therefore when the app tried to make use of any service, an exception was occurring and, the service call, whatever it was and to whichever service, wasn't being executed.

Even though I've been using WCF services for years, I was not aware until yesterday that a missing or malformed binding could stop all service calls from being executed (I mention malformed bindings because our first attempt to add the missing binding was entered incorrectly and was not valid, leading to the same result as if it wasn't there at all). This was not an intuitive fix to the two problems that we thought were unrelated, and we were lucky to have found the solution in a relatively short amount of time.

Comments

Popular Posts

Resolving the "n timer(s) still in the queue" Error In Angular Unit Tests

How to Get Norton Security Suite Firewall to Allow Remote Desktop Connections in Windows

How to Determine if a Column Exists in a DataReader

Silent Renew and the "login_required" Error When Using oidc-client

Fixing the "Please add a @Pipe/@Directive/@Component annotation" Error In An Angular App After Upgrading to webpack 4