问题描述
我有一个Web应用程序,其中有一个名为WebService.asmx的Web服务.现在,我创建了一个Windows应用程序,并在其中添加了Webservice.asmx的Web参考.
当我在调试模式下构建此Windows应用程序时,它可以正常运行,并且可以正常执行.
但是,当我在发布模式下构建此应用程序时,它给出0错误和0警告,但是当我执行该应用程序时,它无法获取Web参考.
另外,当我尝试更新Web参考时,它会显示错误消息,显示为"HTML文档不包含Web服务发现信息" .
谁能告诉我如何解决这个问题?
在此先感谢.
Hi,
I have a web application in which i have one web service called WebService.asmx
Now, i have created one windows application and added web reference in it for Webservice.asmx.
When i build this windows application in debug mode, it works fine, also executes properly.
But when i build this application in Release mode, it gives 0 errors and 0 warnings, but when i execute the application, it cant get web reference.
Also, when i try to update web reference, it gives error message as "The HTML document does not contain web service discovery information".
Can anyone tell me, how to solve this problem?
Thanks in advance.
推荐答案
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
<add name="HttpSoap"/>
</protocols>
</webServices>
</system.web>
这篇关于Web引用在发布模式下无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!