简体   繁体   English

将Web服务添加到项目库作为服务参考时出错

[英]Error on adding a web service to project library as a service reference

I am adding a webservice to a web project as a service reference. 我正在将Web服务添加到Web项目中作为服务参考。 The error on adding which occurs on adding is 添加时发生的添加错误是

The HTML document does not contain Web service discovery information. HTML文档不包含Web服务发现信息。 Metadata contains a reference that cannot be resolved. 元数据包含无法解析的引用。

Before adding the webservice as a service reference I tried adding it as web reference.On doing it there was no error but, i was not able to access a class through the web reference. 在将Web服务添加为服务参考之前,我尝试将其添加为Web参考。这样做没有错误,但是我无法通过Web参考访问类。 So I went for the option of service reference. 因此,我选择了服务参考。 I was able to add service reference to a web project and every thing works fine but I am unable to do the same in a class library. 我能够将服务引用添加到Web项目,并且一切正常,但是我无法在类库中执行相同的操作。

Your help will be appreciated.. 您的帮助将不胜感激。

Thanks 谢谢

Right click on your service in Solution Explorer and select View in browser. 在解决方案资源管理器中右键单击您的服务,然后选择在浏览器中查看。 you may have some errors in your service and in this way you can find out the errors. 您的服务可能存在一些错误,这样您就可以找出错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM