Click here to Skip to main content
15,886,025 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
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.
Posted
Updated 17-Nov-12 14:26pm
v2
Comments
n.podbielski 17-Nov-12 6:22am    
And where is hosted your .asmx?
Sonal Wagh 17-Nov-12 6:44am    
I hosted that web service on IIS. I can access it from browser
n.podbielski 17-Nov-12 7:02am    
But services contains special page with configuration. Maybe this is disabled.
Sonal Wagh 17-Nov-12 7:10am    
I have web service in web application and its configurations are in web.config
n.podbielski 17-Nov-12 7:43am    
Find url to which your windows application is revering and see it is working.

1 solution

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

XML
<system.web>
     <webServices>
      <protocols>
        <add name="HttpGet"/>
        <add name="HttpPost"/>
        <add name="HttpSoap"/>
      </protocols>
    </webServices>
</system.web>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900