1 Replies - 1779 Views - Last Post: 29 September 2012 - 07:19 AM Rate Topic: -----

#1 asdbabil  Icon User is offline

  • D.I.C Head

Reputation: -6
  • View blog
  • Posts: 241
  • Joined: 26-October 08

Web Service Request from Windows Service

Posted 28 September 2012 - 09:10 AM

Hello,

I have a windows service that has a scheduler that fires off every 15 minutes. When it fires off, it collects data from a db and serialize the data into a json object. I need to call some URL and then pass the json object to the url.
Can somebody help with passing this json object to the url?

Thank you in advance.
Is This A Good Question/Topic? 0
  • +

Replies To: Web Service Request from Windows Service

#2 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3535
  • View blog
  • Posts: 10,945
  • Joined: 05-May 12

Re: Web Service Request from Windows Service

Posted 29 September 2012 - 07:19 AM

You could use the DataContractJsonSerializer.WriteObject() to produce the JSON. The stream you pass in would be the request stream that used to open the HttpWebRequest on the URL.

http://msdn.microsof...y/bb908459.aspx
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1