w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Windows Service not writing text file after installation in Windows Service System

Check the following:

  1. The account running the windows service has write permissions on the folder path.
  2. The folder path is correct.
  3. You might be running the service as Admin on your local box, hence it has all privileges.
  4. Also in your Exception block, ensure the ex.ToString() is logged. It gives a lot of info.
  5. Your client.Close() can also raise an exception. Take care of that scenario.

If there are file access issues, then put an uber try/catch block and try to write the text file on a public folder first where you know Everyone has access.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.