Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey programmers!!!

While adding a web reference to an externally hosted asmx webservice I am getting an error "Value cannot be null.
Parameter name: discoveryError & mexError". And the button "Add reference" appearing disabled. Kindly help me people.
Posted
Updated 8-Oct-18 21:34pm
v2

XML
I've found the solution.  And let me share the solution so that it can benefit others.
We have to change the web.config file of the project. Just add these tags in web.config file.

<system.net>
  <defaultProxy useDefaultCredentials="true">
  <proxy proxyaddress="http://direct.data.com/cmv/cmv.asmx"  bypassonlocal="True"/>
  </defaultProxy>
  </system.net>

And Then create the object of the service reference like this(in .aspx.cs file).

reference_Name.Service_NameSoapClient object_name =
 new reference_Name.Service_NameSoapClient();

And then call the web method like this.

object_name.method_name(parameter1,parameter2);

Here I've made the explanation generic by using reference_Name,Service_Name, object_name
These are not keywords :)
 
Share this answer
 
Goto internet properties --> LAN settings --> Advanced --> Add the IP to (do not use proxy for address) in pc where reference is added . Issue resolved.
 
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