欧非资源网:安全、免费、专业放心的资源下载站! 最新软件|软件分类

您的位置:欧非资源网 > 其他专区 > SharePoint > Sharepoint 如何解决Reference web service in Sharepoint出错

Sharepoint 如何解决Reference web service in Sharepoint出错

时间:2020-01-15 21:52作者:admin来源:未知人气:287我要评论(0)

当我们在VS或网页中引用Sharepoint 网站的Web service时,可能会遇到如下报错
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 Schema' 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.
那么可以从以下几个方面来试着解决此问题
1.在你的URL后面键入 ?wsdl
  如:(http://server:port/_vti_bin/UserGroup.asmx?wsdl)
2.点击service description如下图


 


3.url地址应指向为Central Admin site而不是你创建的 site collection。如此也可解决
例如我们有如下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
那么就把url指向http://server:110/_vti_bin/UserGroup.asmx,而不是其它两个你自己创建的site collection

4.找到正确的url地址。
如果你键入的url有错,你也会遇到此问题,
例如:如果 http://moss2010:810/sites/YourSite/_vti_bin/list.asmx 是你的webservice真正所在的的url地址
而你却引用 http://moss2010:810/YourSite/_vti_bin/lists.asmx (removed the folder sites) ,如此虽然还是可以产生asmx page 但是却无法产生disco或 wsdl文件。
你会得到 404报错或类似错误 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.

相关阅读 SharePoint中Office文件无法打开的解决方案如何快速生成SharePoint测试大文件如何查询SharePoint Library中空文件夹?如何快速备份SharePoint Farm Solution如何解决Event Viewer中SharePoint Error - Event ID 8321SharePoint 2016 CU安装失败,"Exception: The upgraded database schema doesn't match the TargetSchema"的解决方案InfoPath Error “此文档库已经被重命名或删除,或者网络问题导致文件无法保存…” 的解决方案SharePoint 2013 App概述How to Shrink SharePoint Content Database Log File?Project Web App Feature无法开启的解决方案

文章评论
发表评论

热门文章 SharePoint 2016 图文安装教程 后面有激活序列号、密钥分享[SharePoint入门教程]一SharePoint发展、工具及术语如何用 SharePoint Online创建团队网站?SharePoint Iframe 报错“此内容不能显示在一个框架中”

最新文章 SharePoint中Office文件无法打开的解决方案如何快速生成SharePoint测试大文件 如何查询SharePoint Library中空文件夹?如何快速备份SharePoint Farm Solution如何解决Event Viewer中SharePoint Error - Event ID 8321SharePoint 2016 CU安装失败,"Exception: The upgraded database s

人气排行 SharePoint 2016 图文安装教程 后面有激活序列号、密钥分享[SharePoint入门教程]一SharePoint发展、工具及术语如何用 SharePoint Online创建团队网站?SharePoint Iframe 报错“此内容不能显示在一个框架中”SharePoint 2013 安装图解 SharePoint安装步骤图解教程SharePoint 如何开启访问请求[SharePoint入门教程]一SharePoint概述[SharePoint入门教程]一创建SharePoint母版页

盖楼回复X

(您的评论需要经过审核才能显示)