locked
Service Reference Error to ADO.net Data Services in SharePoint 2010 RRS feed

  • Question

  • Hi I'm having problems creating a service reference to the Sharepoint Data Services endpoint e.g. 'http://sharepoint/_vti_bin/ListData.svc/'. Is there a way of specifying credentials for VS when it makes a service reference?

    My Dev machine is set up with Forms Authentication. When I try to create a service reference in my silverlight app I get the following error. Does anyone know a way around this.

     

    There was an error downloading 'http://sharepointdev/_vti_bin/ListData.svc/'.
    The request failed with an empty response.
    Metadata contains a reference that cannot be resolved: 'http://sharepointdev/_vti_bin/ListData.svc/'.
    The HTTP request was forbidden with client authentication scheme 'Anonymous'.
    The remote server returned an error: (403) Forbidden.
    If the service is defined in the current solution, try building the solution and adding the service reference again.


    Chris
    • Moved by lucy-liu Friday, July 22, 2011 5:03 AM it is related to SharePoint2010 (From:Visual Studio Editor)
    • Moved by Jinchun ChenMicrosoft employee Friday, July 22, 2011 5:06 AM (From:SharePoint 2010 - General Questions and Answers)
    Tuesday, July 19, 2011 6:23 PM

Answers

  • Hi Fresno,

    Because of security consideration, the ListData.svc web service cannot be accessed using anonymous credential. That is the error "The HTTP request was forbidden with client authentication scheme 'Anonymous'." means.

    The possible solution is generating the service proxy class using svcutil too, then use the proxy class to invoke methods from the service directly.
    http://chakkaradeep.wordpress.com/2008/08/07/generating-wcf-proxy-using-svcutilexe/

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)
    Tuesday, July 26, 2011 1:55 PM

All replies

  • Hi Fresno,

    I am moving this thread from “Visual Studio Editor" forum to the “SharePoint 2010 - General Questions and Answers” forum. Since this issue is related to SharePoint2010.There are more experts in the “SharePoint 2010 - General Questions and Answers" forum.

    Thank you for your understanding!

     

    Best regards,

    Lucy


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 22, 2011 5:03 AM
  • Hi Fresno,

    Because of security consideration, the ListData.svc web service cannot be accessed using anonymous credential. That is the error "The HTTP request was forbidden with client authentication scheme 'Anonymous'." means.

    The possible solution is generating the service proxy class using svcutil too, then use the proxy class to invoke methods from the service directly.
    http://chakkaradeep.wordpress.com/2008/08/07/generating-wcf-proxy-using-svcutilexe/

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)
    Tuesday, July 26, 2011 1:55 PM