Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 27, 2012 09:36 PM by TPS
Mar 15, 2012 02:59 AM|LINK
Has anyone been successful at adding a service reference to a Consumer Preview Xaml C# project that is pointed at an Asp.Net 4 WebApi service project?
VS tells me there are no webservice projects in the solution.
I have tried adding the url manually by the following:
I have Internet and Private Network capability set in the manifest.
There was an error downloading 'http://localhost:1500/_vti_bin/ListData.svc/$metadata'. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:1500 Metadata contains a reference that cannot
be resolved: 'http://localhost:1500/'. There was no endpoint listening at
http://localhost:1500/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. Unable to connect to the remote server No connection could be made because the target machine
actively refused it 127.0.0.1:1500 If the service is defined in the current solution, try building the solution and adding the service reference again.
Jul 27, 2012 07:43 PM|LINK
This is probably a late reply, but I will try anyway:
The reason why you are getting that error is because you cannot add a service reference to ASP.NET Web API because it is not a SOAP service, and therefore, does not expose any metadata. ASP.NET Web API was designed to be a RESTful service.
For SOAP services, you may want to look at WCF.
Jul 27, 2012 09:36 PM|LINK
Thanks Paco, I finally figured that out.