title: C#, iis7 web server not writing log files
body: <p>I'm trying to get my web server to write logs to a txt file on the server. It should be simple and it is working fine on my development machine but it doesn't on the server.
  I have followed he advice in this: <a href="https://stackoverflow.com/questions/7334216/iis7-permissions-overview-applicationpoolidentity">IIS7 Permissions Overview - ApplicationPoolIdentity</a></p>
  
  <p>But it still won't write. the path is correct and it should have the proper permissions after following the above link.
  my code for writing the file is:</p>
  
  <pre><code> private void Logger(String lines)
      {
          String fileName = DateTime.Now.Day.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString() + "_Logs.txt";
  
          try
          {
              System.IO.StreamWriter file = new System.IO.StreamWriter("C:/Web_Srvice_Logs/" + fileName, true);
              file.WriteLine(lines + " " + DateTime.Now.ToString());
  
              file.Close();
          }
          catch (Exception) { }
  </code></pre>
  
  <p>any Ideas?</p>