error downloading $metadata from webservice
Asked Answered
M

2

6

I am trying to add web reference when adding web reference url in windows application it shows error like this. how do i solve it?

There was an error downloading 'http://www.example.com/BackEndWebService/LoginWebService.asmx/$metadata'.

The request failed with the error message:

$metadata Web Service method name is not valid.

Monachism answered 29/3, 2016 at 6:26 Comment(5)
Are you adding it as a web reference, or a service reference? Web references are deprecated.Nonappearance
I am adding it as Service Reference which displays dailogue box , in advanced button i clicked Add Web Reference and enter the urlMonachism
Can you open it in a browser? There might be an issue with the web service. See blog.consejoinc.com/2012/12/…Nonappearance
yes,i open it in a bowser and it is working well..Monachism
Just had the same issue, I finally figured out that selecting the service on VS and going to properties shows the url, just changed it and it worked.Adrianople
F
19

I had the same issue the other day when tried to update the web reference and managed to fix it by adding ?WSDL at the end. That should work.

enter image description here

Ferromagnetic answered 25/5, 2016 at 2:32 Comment(2)
Thanks! In my case was a external java web service and I replaced the dot by a question mark: webservice.web/webservicename.wsdl --> webservice.web/webservicename?wsdl and it worked!Monogenetic
Is this behavior explained/documented somewhere?Sardou
C
0

In my case, I got this error for adding a Hashtable as a parameter and it failed because it's not supported:

The type system.collections.hashtable is not supported because it implements IDictionary

IDictionary is not serializable, so in my case I switched to a simple array

Cladophyll answered 18/4, 2021 at 12:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.