title: Is it possible to save JSON file to a server
body: <p>I want to store some simple user data to a JSON file on my server so I can use it with my PHP. I know how to create a JSON file thanks to this handy article: <a href="https://stackoverflow.com/questions/16921652/how-to-write-a-json-file-in-c">How to write a Json file in C#?</a> But in this article they save the file locally but I want it to save it on my external server but don't know how since I never really used JSON before. Can someone tell me if it's possible and so how what kind of method do I need to use? I thought something like this would work, atleast it seemed reasonable to me:</p>
  
  <pre><code>var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://" + ConfigurationManager.AppSettings["jsonuri"] +"/apptest/saleskickerbuffer.txt");
  httpWebRequest.ContentType = "application/json";
  httpWebRequest.Method = "POST";
  
  using (var sw = new StreamWriter(httpWebRequest.GetRequestStream()))
  {
      if(reqCat == "bvg")
      {
          json = "{\"bedrijfsNaam\":\"" + bedrijfsNaam + "\"," +
                          "\"ContPers\":\"" + ContPers + "\"," +
                          "\"TelNum\":\"" + TelNum + "\"," +
                          "\"email\":\"" + email + "\"," +
                          "\"Land\":\"" + Land + "\"," +
                          "\"Plaats\":\"" + Plaats + "\"," +
                          "\"PostCode\":\"" + PostCode + "\"}";
          MessageBox.Show(json);
      }
  
      sw.Write(json);
      sw.Flush();
      sw.Close();
  }
  </code></pre>
  
  <p>This resulted in a failure ofcourse because it did nothing. This is bacause I have never used JSON before.</p>
  
  <p>Can someone teach me a good method for this if it's posssible?</p>