Last post Jul 15, 2016 05:12 AM by Chris Zhao
Jul 14, 2016 09:45 PM|nissan|LINK
I am calling an ODATA service from console app, and receive the error "unable to connect to remote server"
This is the code.
string uri = ConfigurationManager.AppSettings["DemoDataServiceUri"];
// instantiate a new data context
DemoDataServiceUri.DemoDataServiceContext _context = new DemoDataService.DemoDataServiceContext(new Uri(uri));
var emps = from x in _context.Employees
Jul 15, 2016 03:28 AM|jmpalines|LINK
try to ping/telnet the odata server, try to print the uri as well so you can see whther it is the correct address
Jul 15, 2016 05:12 AM|Chris Zhao|LINK
Check if instance uri is correct and visit service through browser address bar. For more information, please see
Calling an OData Service From a .NET Client and
Create an OData v4 Client App (C#).