1
votes

Having spent around 3 days now and losing most of my hair I'm calling out the the wonderful stackoverflow community!

We've got a bunch of WCF Web Services on a dedicated Windows Server 2008 R2 running IIS7.5. Some xamlx, svc, asmx.

We've been running these services for a fair few years with no problem. Now all of a sudden we're finding that any of our apps (web / console etc) are failing to call them. If we explicitly reference the WSDL (appending ?wsdl to a call for example http://server:8000/app/app.svc?wsdl) then we're sorted and everything works again.

Problem is this doesn't explain what happened on the server that caused all of our services to simply stop working.

When we try to call the services using WCFTestClient

Error: Cannot obtain Metadata from http://server:8081/app/app.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://server:8081/app/app.svc Metadata contains a reference that cannot be resolved: 'http://server:8081/app/app.svc'. Content Type application/soap+xml; charset=utf-8 was not supported by service http://server:8081/app/app.svc. The client and service bindings may be mismatched. The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..HTTP GET Error URI: http://server:8081/app/app.svc The HTML document does not contain Web service discovery information.

I'll happily go through and implement more detailed publishing information to all our web.config files. No problem with that at all! But I want to understand what has happened to with this server that has suddenly caused the discovery of these services to fail.

Also, we've not run windows updates on here since April 2013 (we've since updated and restarted and it's had no effect)

The applications are a mix of .NET 2 up to and including 4.5 and discovery is failing on all of them. We also have a mirror of this server we use for testing with the exact same setup and the discovery of these services does not fail.

Any help is appreciated!

1
What do you mean when you say "Reference WDSL"? are you just opening a browser and pasting that URL (including WSDL in the call) ? Have you seen any errors in Windows Event log? - Jportelas
No errors in the event log. - ianrathbone
With regards to the wsdl I'm talking about the difference between this: "server:8081/app/app.svc" and this "server:8081/app/app.svc?wsdl" - ianrathbone
To me it seems like the client and the server have different bindings, seems like one is trying to do a REST call while the other thinks it is SOAP... - Jportelas
@Jportelas I thought similar but I checked with fiddler and WCF test client runs through a bunch of different types when doing it's own discovery - so it appends /mex on one attempt and /$metadata on another. None of which are successful (HTTP 415 and 400 issues) - ianrathbone

1 Answers

0
votes

Wow it took quite a while to fix this but we found out the issue - it was with New Relic's .NET Agent. After removing it we had no problems.