Unable to add service link

I started to learn WCF. I wrote a simple service for querying SQL relationships through LINQ.

[ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = aspNetCompatibilityRequirementsMode.Allowed)] public class Order_WCFService { [OperationContract] public List<Order> getOrders() { List<Order> orderList= null; try { orderList= DAL.GetList<Order>(); return orderList; } catch (Exception) { throw; } } } 

This is in the ASP.NET-MVC project.

I have a simple Silverlight application. He is in the same decision, but in a different project.

I would like to use my service using the silverlight application.

I am trying to "Add a link to a service ...", and in the left column I have a list of all available ASMX and WCF services. When I click on any of the services, it tries to download the service information, but does not work after 10-20 seconds: "An error (details) occurred while trying to find the services ..."

What am I doing wrong here?

thanks

I am 100% sure that the services are functional, because I can call them through AJAX.

+4
source share
1 answer

Maybe a stupid question, but was the service started when you tried to add a link to the service (if you were using the Visual Studio built-in web server, was it running the ASP.NET MVC project containing the running service)? You can also try specifying the full WSDL address in the Add Service Link dialog box, rather than selecting it from the list after verifying that this WSDL is available in your browser.

+2
source

All Articles