Sunday, November 16, 2008

ErrHow to resolve Error: ".asmx was not recognized as a known document type."

If you get an error below when trying to add a reference to webservice:
The document at the url http://localhost:81/PWA/_vti_bin/psi/project.asmx was not recognized as a known document type.The error message from each known type may help you fix the problem:- Report from 'DISCO Document' is 'Root element is missing.'.- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.- Report from 'http://localhost:81/PWA/_vti_bin/psi/project.asmx' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'.
Type ?wsdl after the webservice URl and the error should be resolved or alternativly click on the service description in the summary window and the Error should be resolved. Below is image to describe the process.




6 comments:

Adrian Baisan said...

Thanks a lot... That error scared me!

IrateCoder said...

Thanks, been struggling with that for ages!

Vadim Indrikov said...

You are life saver.

Mykhailo Apolonov said...

Thanks!

Manesh Golekar said...

Hi ,
I m getting same error ...
If I click on Service Description
It repeats Same error ..

WSDL was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'DISCO Document' is 'Discovery document at the URL

Unknown said...

i saved again the web.config file in a UTF8 format and problem was solved (after 6 hours)