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


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

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.