Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7551289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:27:17+00:00 2026-05-30T10:27:17+00:00

I created a c# library file,that will go to local path for e.g(c:\test.txt) find

  • 0

I created a c# library file,that will go to local path for e.g(c:\test.txt) find the file and upload to ftp server.

For testing i just called the dll from console app but how i can run as a windows service,that will run continously ?

I suppose to run this dll as a service to monitor the c:\ folder if any file comes like “test.txt” then upload.

Thanks in Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:27:18+00:00Added an answer on May 30, 2026 at 10:27 am

    A DLL is “called” when you use it’s functions. So if you have a DLL project with a few classes and a few functions inside your classes, simply add the DLL as a reference to your Service project and call the appropriate functions.

    You may want to use this library for creating your Windows Service. The reason being, when you build a Windows Service using the Visual Studio template, the resulting build isn’t really ‘run’. The resulting build is a Windows Service that must be installed and then started using the Services Snap-In. But using Hoytsoft’s custom Windows Service library, your service will install itself automatically and then start itself automatically – just like a regular Windows Form application.

    To ensure your Service runs at startup, remember to configure your Service class to AutoStart (as explained in his CodeProject article). To ensure your Service runs continuously, even when the process is killed, you can add this handy registry hack which sets the Restart Service flags to Restart Immediately.

    This Registry Hack == enter image description here

    Registry Hack:

    Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\<YOUR_SERVICE_NAME_HERE>", true);
    key.SetValue("FailureActions", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 20, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, Microsoft.Win32.RegistryValueKind.Binary);
    key.Close();
    

    Understand that any administrative user can still kill your process by simply disabling your service.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a library which reads the app.config file and gets the type
I have a library I created, File mylib.c: #include <mylib.h> int testlib() { printf("Hello,
I've created a class library that contains three entity models for three databases that
I'm looking for a python library that will help me to create an authentication
I have a class library that I created using the Class Library project template.
I've been working on a SWF that will be converted into a Projector file,
I have created a config file that looks like: $conf['db_hostname'] = localhost; $conf['db_username'] =
when I tried to create a shared library file using the cl command in
Using Python's Imaging Library I want to create a PNG file. I would like
When I'm building a class library I usually create a file Enums.cs to hold

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.