Reputation: 87
i just created a webservice with visual studio 2010 and .net 4, and published it to my website subdomain. [subdomain has virtual directory and i have set the rules]. when i try to add my webservice to other c# project from "add service refference" => "advanced" => "add web refference" it just show me this error in "webservice found section"
The document at the url http://service.proapp.ir/sedardIP.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem:
i added .svc application/octet to mime but nothing has changed i added
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
</webServices>
too but nothing has changed , can u plz help me?????????????
tried adding refference without advanced throwing this error :
The document at the url service.proapp.ir/sedardIP.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. - Report from 'DISCO Document' is 'There was an error downloading 'service.proapp.ir/service/sedardIP.asmx?disco'.'. - The request failed with HTTP status 404: Not Found. - Report from 'http://service.proapp.ir/sedardIP.asmx' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. - Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. Metadata contains a reference that cannot be resolved: 'service.proapp.ir/sedardIP.asmx'. Metadata contains a reference that cannot be resolved: 'service.proapp.ir/sedardIP.asmx'. If the service is defined in the current solution, try building the solution and adding the service reference again.
Upvotes: 1
Views: 5419
Reputation: 6978
In my experience, adding your web service reference straight - instead of going in the advanced section - from the service reference panel has never caused me any problem. Perhaps try that.
Failing that, this will work:
try the same process service reference > add service reference
with the following url
http://service.proapp.ir/sedardIP.asmx?WSDL
Upvotes: 3