title: how to save a file at the server in asp.net?
body: <p>i have a log file which needs to be written to the server . If i had the code in a code behind file for a web form i would have done this </p>
  
  <pre><code>File.WriteAllText(Server.MapPath("/ErrorLogFile/ErrorLogFile.log"),json);
  </code></pre>
  
  <p>Now, since my code sits inside the App_Code folder i have no access to the Server class ...so i have to tell it to go find the folder and then write it to the disk. I can accomplish this by telling it the full path and it will work . but i want to tell it to go look for the ErrorLogFolder in the directory you are in and then write the file there . Is there a way to do that ?</p>