locked
Windows service issue RRS feed

  • Question

  • I have installed a service in one of my new test server which is used for download or upload files from the ftp server by calling an exe file, which will internally call cuteftp tool. Here my issue is when I am starting the windows service it not working, the service is not even connecting to ftp server, and there is no exception or error is occurring..

    the service is logged on with a local adminid, verified permission and seems fine

    when I am opening the exe file manually by clicking “run as different” user with the local admin the service is working perfectly and the upload/download is happening.

    Please advice if any configuration changes in windows level

    Wednesday, July 1, 2020 12:49 PM

All replies

  • This sounds like a job for the logged build of the service. You could also run Visual Studio as administrator and debug the service.

    But remember that a service runs in a different logon session to a user, so you have to be sure that the FTP client is capable of working in session 0. But this is something that you have to debug yourself.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Wednesday, July 1, 2020 1:19 PM
  • Hello Sareesh MG,

    Thanks for posting here.

    For narrowing down this issue, you can call InternetOpen then InternetConnect or InternetOpenUrl to try to connect the FTP server in your service to see if it can connect successfully or not. 

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 2, 2020 8:26 AM