• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

Windows service with app.config file

i have a windows service with config file...
i have a path in config file which my windows service is suppose to read and do the work.

here is my config file... i dont know why it is not working.

 <!-- <add key="FilesPath" value="C:\DestinationFolder\" />
        <add key="ErrorFiles" value="C:\DestinationFolder\ErrorFiles\" />-->

        <add key="FilesPath" value="\\90.xxx.xxx.xx\c$\SourceFiles\" />
        <add key="ErrorFiles" value="\\90.xxx.xxx.xx\d$\DestinationFiles\" />

above i have given both the path's the one which uses C:\Destination works fine as it is on my computer (commented out)
but when i use the server path it doesnot work.
NOTE: I CAN ACCESS "\\90.xxx.xxx.xx\c$\SourceFiles\" THIS PATH by goin in START/RUN/and typing the path...
I am saying this is not working because when i change the path to "C:\DestinationFolder\" my windows Services works like a charm.

Please help
1 Solution
hmm.. try doing this.. put the code in try catch block and print the exception. you will know abt the error properly.

all the services run under some default user account in case of windows 2003 its is NetworkService. So my probable guess is  there is permission issue to that folder. one of easy way to solve this problem will be to run service under your user account.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now