Click here to Skip to main content
15,113,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to consume a wcf service into a .net web application. First, I created a service. After that I published that service in c:/inetpub/wwwroot folder.

After that, I tried to add that service reference to my web application. In that one I entered the service localhost url (ie) http://localhost/dotnet/Service.svc. After clicking ok messagebox showing
"There was an error downloading metadata from the address.Please verify that u have entered a valid address".

How can I solve this?

Thanks in advance for the help.
Posted
Updated 4-Jan-12 1:16am
v4
Comments
m@dhu 4-Jan-12 5:14am
   
set includeExceptionDetailInFaults property to 'true'. You get the exception details.
Check whether you can access the service in the browser.
Nicholas Butler 4-Jan-12 7:24am
   
Have you configured a MEX endpoint? What do you get if you browse to http://localhost/dotnet/Service.svc?wsdl?
sridharan28 4-Jan-12 7:27am
   
I am getting xml parser error

1 solution

You may also notice that VS2008 also issues another error

There was an error downloading metadata from the address. Please verify that you have entered a valid address.

Well this means that service is not accessible and VS2008 cannot download metadata required for building the service. In our case, we know the reason – someone missed the Troubleshooting Tip#1. But in general case a number of reasons may cause this error all of which boils down to one thing – VS2008 cannot connect to the service and cannot download data required for building reference.

Anyway, if you see the error, click OK in Error dialog, close WCF Service Host window, click Cancel in Add Service Reference, save all files, close and re-open VS2008 as administrator, open WCFinVS2008 solution and repeat steps 2 from above.

FYI WCF in VS2008 – Basic Service and Client over HTTP channel[^]
   

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