locked
Posting Data to Web Service? RRS feed

  • Question

  • Hi, all.

     

    I currently have a WinForm application that pulls the current program and version # for all our software that is stored on a particular machine. We have usually 50+ individual installers. (Long story).

    The WinForm application has been working fine for me, but as the number of servers and whatnot increases, I rather rewrite my program as a windows service. I've done some windows service programming before and am familar with the process.

    My question is this, I'd like to create a web service (WCF or ODATA?) that can receive a list of programs from me. I.E. I would have a generic <LIST> object of each program installerd (Company, Name, Version #, Date Installed, etc.) and would like to POST this data to the web service. I'm not sure how to do this or what the best way to do it.

    I will need a way to identify the machine POSTING the data (likely by TCP/IP) so I know what server the program listing is from.

    Any help or example code would be appreciated greatly.

    Tuesday, May 24, 2011 3:46 PM

Answers

  • You can also use an OData service to insert data from a Web enabled client (see here for more info on using the WCF Data Services client to do this), but if all you are doing is inserting records (or have to upload a lot of data) from a single kind of client, a dedicated WCF service operation may be a better bet.

    If, however, you could also benefit from providing model-based access to various kinds of clients, or cross-platform, OData may be worth a look.

    Cheers,

    Glenn Gailey


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, May 25, 2011 4:02 PM

All replies

  • Hi dm,

    Welcome!

    According to your description, you want to let individual installers set information to a web service, right? I think you can do it, design a WCF and export an endpoint(bing:TCP/IP) then add service reference and let proxy to call contract. You can use ADO.net or Entity framework(data Service) to install records to database.

    Have a nice day.


    Alan Chen[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.

    Wednesday, May 25, 2011 8:56 AM
    Moderator
  • Thanks for the feedback.

     

    Now I need to find some examples of doing this.   I just wasn't sure if it was WCF Data Services I cared about or some sort of oData interface.   I know oData seems to be used more for consuming... wasn't sure about receiving.

     

    Thanks

    http://myblog4fun.com/

     

    Wednesday, May 25, 2011 3:39 PM
  • You can also use an OData service to insert data from a Web enabled client (see here for more info on using the WCF Data Services client to do this), but if all you are doing is inserting records (or have to upload a lot of data) from a single kind of client, a dedicated WCF service operation may be a better bet.

    If, however, you could also benefit from providing model-based access to various kinds of clients, or cross-platform, OData may be worth a look.

    Cheers,

    Glenn Gailey


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, May 25, 2011 4:02 PM
  • Thanks for the tip.  I guess I got some reading to do....

     

     

    Want to go green?

    http://myblog4fun.com/archive/2010/10/17/currentcost-envi-and-google-powermeter.aspx

     

     

    Wednesday, May 25, 2011 6:35 PM
  • Hi dm,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions? 
     
    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[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.

    Monday, May 30, 2011 3:31 AM
    Moderator
  • Hi, thanks for the follow up.

    I'm still investigating and testing.

     

     

    Friday, June 10, 2011 9:16 PM