Archive | August 2011

SharePoint 2010 Error : The document at the url http://localhost/_vti_bin/Lists.asmx was not recognized as a known document type

Today, I was just trying to program against a list using the List Web Service in SharePoint 2010.  In my Visual Studio 2010, I have created a new WPF Project which will interact with my SharePoint list.

To let my WPF application talk with SharePoint List, I need to add List Web Service as below :

1. Right-click the References in Solution Explorer

2. Select Add Service Reference

3. Click on Advance

4. Click on Add Web Reference

5. Click on “Web services on the local machine”

6. Find the web service with name “List” (“http://localhost/_vti_bin/Lists.asmx”)

7. Select the web service.

Aah!!! You got the below error :

The document at the url http://localhost/_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 ‘http://localhost/_vti_bin/Lists.asmx’ is ‘The document format is not recognized (the content type is ‘text/ht

Now What??

Solution:

Just click on the Service Description and it will enable Web reference name textbox. and you will be able to Add Reference into your project 🙂

Thanks and have fun!!!!!

 

Advertisements
%d bloggers like this: