locked
Using DataSvcUtil.exe with authentication RRS feed

  • Question

  • I need to use DataSvcUtil.exe to create a client class for a data service that requires authentication. This is needed so that I can consume the service in a Windows Phone 7 application ('Add Service Reference' is not an option). I'm following this tutorial http://www.nickharris.net/2010/07/consuming-wcf-data-services-on-windows-phone-7/ (and there are several others that outline the same steps, so I'm pretty sure I'm on the right track).

    Is there a way to pass credentials in the datasvcutil.exe command line arguments?

    Any help or alternative suggestions are greatly appreciated.

    Thursday, May 5, 2011 7:28 PM

Answers

  • Hi Ryan,

    Instead of passing credentials in command line (I do not think it is supported), you can download $metadata to your local drive and use /in: parameter to read the csdl from a local file.

     

    Thanks,

     


    Sih Huseyin Ulger - [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, May 5, 2011 10:22 PM
  • Thanks, that worked like a charm!

    I downloaded the $metadata file, and changed the extension from .xml to .edmx. I replaced the /uri: parameter with the /in: parameter pointing to the .edmx file.

    Friday, May 6, 2011 12:01 AM

All replies

  • Hi Ryan,

    Instead of passing credentials in command line (I do not think it is supported), you can download $metadata to your local drive and use /in: parameter to read the csdl from a local file.

     

    Thanks,

     


    Sih Huseyin Ulger - [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, May 5, 2011 10:22 PM
  • Thanks, that worked like a charm!

    I downloaded the $metadata file, and changed the extension from .xml to .edmx. I replaced the /uri: parameter with the /in: parameter pointing to the .edmx file.

    Friday, May 6, 2011 12:01 AM