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 972023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:03:25+00:00 2026-05-16T03:03:25+00:00

I created a simple windows service on my local PC and added the following

  • 0

I created a simple windows service on my local PC and added the following code to it

 Protected Overrides Sub OnStart(ByVal args() As String)
    Const iTIME_INTERVAL As Integer = 60000      ' 60 seconds.
    Dim oTimer As System.Threading.Timer

    System.IO.File.AppendAllText("C:\AuthorLog.txt", _
        "AuthorLogService has been started at " & Now.ToString())

    Dim tDelegate As Threading.TimerCallback = AddressOf EventAction
    oTimer = New System.Threading.Timer(tDelegate, Me, 0, iTIME_INTERVAL)
End Sub

Protected Overrides Sub OnStop()

End Sub


Public Sub EventAction(ByVal sender As Object)
    System.IO.File.AppendAllText("C:\AuthorLog.txt", _
        "AuthorLogService fires EventAction at " & Now.ToString())
End Sub

Next I added a Setup project to this solution and added a custom action (By double clicking application folder then clicking add output folder then selecting primary output from the dialog). The solution builds fine but I have 2 problems.

1) Everytime I install the service, it asks me for the username, password and confirm password; I was wondering if there was anyway to get rid of it atleast while running locally. I tried setting the account type to user, local service, local system etc but it keeps popping up.

2) Once I enter the credentials (random ones), I get an error “No mapping between account names and security ids was done”.

Kindly help me out

  • 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-16T03:03:26+00:00Added an answer on May 16, 2026 at 3:03 am

    1: You could make your service be selfinstalling as in this codeproject article and then just send in the username/password you want to use to the ServiceProcessInstaller.

    2: Try entering the credentials in a different format. If you’re currently using “.\user” try writing “computer\user” or vice versa.

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

Sidebar

Related Questions

I have created a simple windows service that periodically checks a remote database via
I have created windows service project in vs2008. I have created simple serivce project
i've created simple windows service which gets some xml information once in a hour.
I've created a very simple Windows Service projects with this tutorial . I've build
I've created a very simple .NET Windows Service and installed it using InstallUtil.exe utility.
We have created a simple wix project for a basic windows application. Everything builds
I have an application that is a not so simple Windows service (C#). I
I have created a C# web service using visual studio to stop the windows
Created a simple WCF service that basically logs to a db. the build is
Hi I have created a windows service and I have two different timer variables

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.