Request format is unrecognized for URL unexpectedly ending in '/$metadata'

Posted: 04/23/2013

Today, I ran into the following two errors while trying to use a SOAP web wervice:

  • Request format is unrecognized for URL unexpectedly ending in '/$metadata'
  • Request format is unrecognized for URL unexpectedly ending in '/mex'.

When I tried to consume my web service running locally everything worked fine. When I ported this to a test server and then pointed my client application to that service the above errors started occurring. The simple solution was to just add “?WSDL” to the end of my service reference:

Before (Incorrect):

  • https://www.mytestsite.com/WebService/Report.asmx

After (Correct):

  • https://www.mytestsite.com/WebService/Report.asmx?WSDL