SharePoint learning notes-how to solve reference web service in SharePoint errors

Source: Internet
Author: User

When we reference the Web service of a Sharepoint website in vs or webpage, the following error may occur:
The document at the url http: // server: Port/_ vti_bin/usergroup. 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 scheme' is 'the document format is not recognized (the content type is 'text/html; charset = UTF-8 ').'.
-Report from 'HTTP: // server: Port/_ vti_bin/usergroup. asmx '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 http: // server: Port/_ vti_bin/usergroup. asmx? Disco '.'.
-The request failed with HTTP status 404: Not found.
-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: 'http: // server: Port/_ vti_bin/usergroup. asmx '.
Metadata contains a reference that cannot be resolved: 'http: // server: Port/_ vti_bin/usergroup. asmx '.
If the service is defined in the current solution, try building the solution and adding the service reference again.
We can try to solve this problem from the following aspects:
1. type after your url? WSDL
For example: (http: // server: Port/_ vti_bin/usergroup. asmx? WSDL)
2. Click service description, as shown in figure

3. the URL address should point to the central admin site instead of the site collection you have created. This can also be solved
For example, we have the following Web applications:
1. SharePoint Central Administration V4 port:-110 http: // server: 110/_ vti_bin/usergroup. asmx
2. SharePoint port:-80 http: // server: 80/_ vti_bin/usergroup. asmx
3. SharePoint port:-220 http: // server: 220/_ vti_bin/usergroup. asmx
Then, point the URL to http: // server: 110/_ vti_bin/usergroup. asmx, instead of the other two site collections you have created.

4. Find the correct URL address.
If the URL you typed is incorrect, you will also encounter this problem,
For example, if http: // moss2010: 810/sites/yoursite/_ vti_bin/list. asmx is the actual URL of your WebService
However, you reference http: // moss2010: 810/yoursite/_ vti_bin/lists. asmx (removed the folder sites), although it can still generate asmx page, it cannot generate disco or WSDL files.
You will get the 404 error or similar error report from 'Disco document' is 'there was an error downloading 'HTTP: // server: Port/_ vti_bin/list. asmx? Disco '.'.
-The request failed with HTTP status 404: Not found.

 

Reference resources

Http://nickgrattan.wordpress.com/2007/07/27/disco-error-creating-sharepoint-web-service-reference/

Http://remindmee.blogspot.com/2008/11/errhow-to-resolve-error-asmx-was-not.html

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.