text: I have this class:
  public class ItensLiberacao { AutorizadorContext contexto = new AutorizadorContext(); ItensLibDTO libDTO = new ItensLibDTO(); public List<ItensLibDTO> getItensLib(int idorcamento) { var lista = contexto.ItensLibs .Where(itens => itens.IdOrcamento == idorcamento) .Select(item => new ItensLibDTO { Produto = item.Produto, Qtde = item.Qtde.ToString(), Unitario = item.Unitario.ToString(), Custo = item.Custo.ToString(), CustoDiario = item.CustoDiario.ToString(), UltCondicao = item.UltCondicao.ToString(), Total = item.Total.ToString() }).ToList(); return lista; }
  And my rest service:
  public class ItensController : ApiController { AutorizadorContext contexto = new AutorizadorContext(); ItensLiberacao itens = new ItensLiberacao(); [AcceptVerbs("Get")] public IEnumerable<ItensLibDTO> getItensLiberacao(int idorcamento) { return itens.getItensLib(idorcamento).AsEnumerable().ToList(); } }
  When I put on(on or in?) my URL: I have this error message:
  Were not found HTTP resources that match the URI of the request ''.
  Answers
  I think it is because localhost is wrong here.
  It tries to go to the localhost from you device but not from the server or pc where the webservice is running,
  @Gigex42, if I call:
  localhost:9078/api/liberacaowork fine. I think that have some problem with my code.
  I tryed out of localhost by my App, but the error continues. The problem is in my service, the method getItensLiberacao doesn't called. What do must I do?
  I wish that my service method is broken, but where? I don't know what to do. I installed a WebApiDebugger and now I have other problem with System.Web.Optimization and this DLL is installed and don't have conflict. I changed my service to:
  and yet continues with error. I need to configure a route?
  localhost is where ever you are calling it from. So if you call that url from the device, it is looking for localhost on the device, not your PC. Your web service is running on your PC, right? So you need to use the IP address of the PC when calling the url from the device.
  @JohnHair, when I run in my site I have same problem. and now I have other problem: System.Web.Optimization each day other problem and I cannot solve.
  That link throws a 404, I suggest you fix your site before continuing with the app as that will confuse things. Fix 1 bug at a time until the site is working as you expect, then return to the app.