locked
dataservicequeryexception was unhandled by user code RRS feed

  • Question

  • I hosted my wcf odata services on a server, and I am able to view the service in IE correctly. In my asp.net web page application I then added a service reference pointing to one of the services. During runtime I get this error when trying to access any service method:

    System.Data.Services.Client.DataServiceClientException: <?xml version="1.0" encoding="utf-8" standalone="yes"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code></code><message xml:lang="en-US">An error occurred while processing this request.</message></error>

    a sample code where the error was caused is:

    MyModelService.MyCard myCard = MyServices.modelService.MyCards.Where(c => c.CardTitle.Trim().ToLower().Equals(cardTitle.Trim().ToLower()) && !c.IsDeleted).FirstOrDefault();
    

    Any idea what I am doing wrong?

    When I reference the service locally in same solution it works all fine.

    service address: http://localhost:55001/MyService.svc

    When I reference the service on the host server it throws error:

    service address: http://service.myhostingurl.com/MyService.svc

    any idea what am I doing wrong?



    • Edited by ssfftt1 Friday, November 23, 2012 1:16 PM
    • Moved by LeoTang Tuesday, November 27, 2012 8:25 AM (From:Windows Communication Foundation (WCF))
    Friday, November 23, 2012 12:46 PM