DISCO Error creating SharePoint Web Service Reference
In Visual Studio 2005 you’ll need to create a web reference before you can start programming SharePoint Web Services. You will typically use a URL like the following:
http://server:port/sites/intranet/projectx/_vti_bin/lists.asmx
However, when creating the web reference you may see the following an error reporting that the DISCO document is missing a root element:

The entire error text is:
The document at the url http://moss2007:2500/sites/DevSite/ _vti_bin/lists.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 ‘http://moss2007:2500/sites/DevSite/_vti_bin/lists.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′).’.
- Report from ‘XML Schema’ is ‘The document format is not recognized (the content type is ‘text/html; charset=utf-8′).’.
To circumvent this problem click “Service Description” in the browser view in the “Add Web Reference” dialog. This shows the WSDL for the web service and allows you to enter a Web reference name. This is equivalent to entering the following URL with the parameter “?WSDL”.
happens when url has spaces
hotfix from MS
http://support.microsoft.com/kb/890201
f00
September 12, 2007 at 7:30 pm
Thanks, explains the problem. Nick
nickgrattan
September 12, 2007 at 9:18 pm
FYI, you also get the exact same problem if the url for the webservice is wrong.
For instance if http://moss2007:2500/sites/DevSite/_vti_bin/lists.asmx is the *actual* url for the web service but you try to reference http://moss2007:2500/DevSite/_vti_bin/lists.asmx (removed the folder sites) it will still generate the asmx page but it will not generate the disco or the wsdl. You would expect that if typed an worng url for a web service you get a 404 or something to that effect but with sharepoint it seems that this is not the case!
shane dixon
December 13, 2007 at 12:06 am
Thanks for the additional information! Nick
nickgrattan
December 13, 2007 at 4:54 pm
I am getting the same error even when all the above conditions are met. not sure if we are not able to add reference through wizard.
any further suggestions, welcome.
thanks in advance.
-Manjunath.
Manjunath
April 1, 2008 at 1:51 pm
Thank you, thank you, thank you!
You would not believe how much this has helped me. I have been stuck on this for almost a week and couldn’t find any help anywhere.
AHHHH!!! The Relief!!!
Thanks again!
Alistair
July 21, 2008 at 4:45 pm
Thanks it really helped me too…
Rinkal
July 25, 2008 at 2:15 pm
The url should point the the Central Admin site and not to a site collection you created
this solved it
sema
August 5, 2008 at 4:54 pm
Hi Folks,
This error is the simple case of sharepoint is not able to map the content.
To solve this issue please have the root Site (/) collection in your Web Site.
that’s all.
Hope this solves the problem.
Samar
October 10, 2008 at 4:01 am
Hi…..
i have tried this but it doesn’t work for me….
http://serverName:port/sitecollectionName/_vti_bin/list.asmx
it gives an error …..
The document at the url http://serverName:port/sitecollectionName/_vti_bin/list.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
Saurabh
November 14, 2008 at 12:15 pm
This has something to do with authentication. SP needs to authenticate with the client.
abmaheco
June 28, 2009 at 2:55 pm
This helped us a lot, we were stuck with this issue for almost 2 days and we had a delivery also which would have got impacted because of this.
Manju
July 28, 2009 at 8:49 am