Reputation: 1163
I developed an MCF service and I have tested it on my local machine and it was working fine.
Then, I uploaded this service to my website. And I navigated to the service address and I can see the description page of the service and WSDL.
Now, I opened my Visual Studio 2010 and created a console application that should consume this service.
Whenever I try to use Visual Studio to Add Service Reference I get the following error:
There was an error downloading 'http://www.mywebsite.com/CBIWebServices/UpdateCurrencies.svc'. The remote name could not be resolved: 'www.mywebsite.com' Metadata contains a reference that cannot be resolved: 'http://www.mywebsite.com/CBIWebServices/UpdateCurrencies.svc'. There was no endpoint listening at http://www.mywebsite.com/CBIWebServices/UpdateCurrencies.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. The remote name could not be resolved: 'www.mywebsite.com' If the service is defined in the current solution, try building the solution and adding the service reference again.
why is this happening ?
Upvotes: 0
Views: 295
Reputation: 1163
I found the solution.
for some unknown reason (at least to me), I needed to remove the WWW from the service address and just use the domain name.
Wrong:
http://www.mywebsite.com/MyService
Correct:
http://mywebsite.com/MyService
I don't know why should I ignore the WWW. but this is how it worked for me
Upvotes: 0