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

  • Home
  • SEARCH
  • 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 514249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:30:19+00:00 2026-05-13T07:30:19+00:00

I have created and started windows service Service1 (with exe as MyService.exe) using c#

  • 0

I have created and started windows service Service1 (with exe as MyService.exe) using c# 2005. .
I have included a method GetMyRandomNumber() that returns a random double value.

The problem here is how could use this running service and how could i call the method.

I have tried adding reference of MyService.exe and access the method as –

Service1 s = new Service1();
MessageBox.Show(s.GetMyRandomNumber().ToString());

But found that the method is not called from the running instance of the service i.e. even though i stop the service the statements are executed.

Could someone explain me how can I call the method from running instance of the service.

Thanks for sharing your valuable time.

  • 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-13T07:30:19+00:00Added an answer on May 13, 2026 at 7:30 am

    You should have a look at Remoting

    • Remoting in C# (Link no Longer available)
    • How To Host .NET Remoting Objects in
      Windows Service Application
    • How to Use .Net Remoting Using (Link no Longer available)
    • A Simple Introduction to .NET
      Remoting
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a created a C# windows service (Serv.exe) which is responsible for performing
I have created a Windows Service that will be calling out to some COM
I have created a windows service by using (Visual Studio 8) and installed it
I have started prgramming a windows service. I have added a notify icon from
We have a Windows Service created in .Net 4.0, the services parses large text
I want to start a windows service which I have created from another windows
I have a windows service that runs at 5 PM everyday. Once it starts
I have created a wcf service which is deployed via a managed windows service.
I have a Windows service written in C# that spawns several worker threads. Those
I have created a windows service and I had installed it on my PC.

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.