Sharepoint学习笔记--如何解决Reference web service in Sharepoint出错
2011-03-23 19:19
471 查看
当我们在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.
相关参考资源
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
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.
相关参考资源
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
相关文章推荐
- Nginx 学习笔记(七)如何解决nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
- Sharepoint学习笔记---如何在Sharepoint2010网站中整合Crystal Report水晶报表(显示数据 二)
- Sharepoint学习笔记---Linq to Sharepoint--如何获取Linq Query 生成的CALM
- Ubuntu 16.04LTS 学习笔记 解决搜狗输入法安装失败,及如何安装搜狗输入法
- JavaWeb学习笔记 日期转换 如何将yyyy-MM-dd已Date类型返回 前篇 未完全解决
- ios学习笔记: IOS8解决获取位置坐标信息出错(Error Domain=kCLErrorDomain Code=0)
- Sharepoint学习笔记---Linq to Sharepoint--如何获取Linq Query 生成的CALM
- Sharepoint学习笔记--如何定位网站集所在的w3wp进程
- Spring学习笔记(十五):STS自带的maven老出错,如何配置单独的maven
- Sharepoint学习笔记—Site Definition系列--7、如何在Site Definition中引入Master Page (1、Master Page的引入)
- Sharepoint学习笔记—Site Definition系列--9、如何在Site Definition中整合Bing Map
- SharePoint【学习笔记】-- 如何在系统Path中添加STSADM的快速引用(Add STSADM in path)
- 学习Altas 笔记[js调用重载的方法出错,如何处理]
- Sharepoint学习笔记--如何定位网站集所在的w3wp进程
- Linux学习笔记:rz接收文件出错解决
- 学习Altas 笔记[js调用重载的方法出错,如何处理]
- SharePoint【学习笔记】-- 如何把网站集从Testing服务器移动到Production服务器(相同的Farm)
- Sharepoint学习笔记---如何找到SharePoint List的Template ID
- 学习Altas 笔记[js调用重载的方法出错,如何处理]
- Sharepoint学习笔记---如何在Sharepoint2010网站中整合Crystal Report水晶报表(报表登录处理)