Web引用在发布模式下无法正常工作 [英] Web references don't work properly in Release mode

查看:68
本文介绍了Web引用在发布模式下无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个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.

推荐答案

我想我已经解决了.
Web应用程序中包含Web服务的文件夹没有访问权限.因此,当我在web.config中添加文件夹权限时,其他应用程序将无法访问Web服务,它正在运行.另外,我在web.config中添加了协议,

I think i got the solution.
The folder which contains web service in web application doesn''t have access permissions. so other application cannot access web service, when i added folder permissions in web.config, it is working. Also, i have added protocols in web.config as

<system.web>
     <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
        <add name="HttpSoap"/>
      </protocols>
    </webServices>
</system.web>


这篇关于Web引用在发布模式下无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆