Hi,
I've written a windows service in vb.net, which works very well. The
service is installed on my server, but now I would like to be able to
start/stop it from any machine on the network.
I know the command sc.exe but unfortunately it does not prompt for
Username/Password, and those are required otherwise I'll always get the
message 'Access denied'. Unless I can bypass authentication to start a
windows service ?
Can you help ?
thanks 4 9584
"graphicsxp " <sa************ *@googlemail.co mwrote in
news:11******** **************@ i42g2000cwa.goo glegroups.com:
Hi,
I've written a windows service in vb.net, which works very well. The
service is installed on my server, but now I would like to be able to
start/stop it from any machine on the network.
I know the command sc.exe but unfortunately it does not prompt for
Username/Password, and those are required otherwise I'll always get the
message 'Access denied'. Unless I can bypass authentication to start a
windows service ?
You can use the ServiceControll er class in .NET to start/stop services
remotely.
Or you can do it via WMI.
Or you could build a remoting interface.
So there are several ways to do it :)
Hi,
Thank you for your reply.
Actually I've started using ServiceControll er class. However I can't
even access a service on my own machine... Here's what I do:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
ServiceControll er1.Start()
End Sub
and
Me.ServiceContr oller1.MachineN ame = "seoul"
Me.ServiceContr oller1.ServiceN ame = "SMemory"
The error message I get is : Cannot start service SMemory on computer
'seoul'.
Any idea what I'm doing wrong ?
Spam Catcher wrote:
"graphicsxp " <sa************ *@googlemail.co mwrote in
news:11******** **************@ i42g2000cwa.goo glegroups.com:
Hi,
I've written a windows service in vb.net, which works very well. The
service is installed on my server, but now I would like to be able to
start/stop it from any machine on the network.
I know the command sc.exe but unfortunately it does not prompt for
Username/Password, and those are required otherwise I'll always get the
message 'Access denied'. Unless I can bypass authentication to start a
windows service ?
You can use the ServiceControll er class in .NET to start/stop services
remotely.
Or you can do it via WMI.
Or you could build a remoting interface.
So there are several ways to do it :)
graphicsxp wrote:
I know the command sc.exe but unfortunately it does not prompt for
Username/Password
What makes you think that it should?
Your service should be configured to always run under a given account so
you shouldn't need to provide username/password every time you start the
service.
Or is that you're trying to /configure/ these settings (using sc)?
IIRC, the "obj= " and "password= " options are the ones you need.
HTH,
Phill W.
hummm.... Well I gave up on using sc. And I wrote my own tool using
ServiceProcess to access the windows service and impersonation to get
granted user rights. It works great now.
thanks
Phill W. wrote:
graphicsxp wrote:
I know the command sc.exe but unfortunately it does not prompt for
Username/Password
What makes you think that it should?
Your service should be configured to always run under a given account so
you shouldn't need to provide username/password every time you start the
service.
Or is that you're trying to /configure/ these settings (using sc)?
IIRC, the "obj= " and "password= " options are the ones you need.
HTH,
Phill W.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tom wilson |
last post by:
I've been through everything with this error and cannot get the
debugger to work remotely. The only thing I can trace it down to is
that RPC is not communicating between servers.
So after many, many hours of searching I found the RPCPing utilitty.
We have 8 servers, 2 Exchange 2003 servers. RPCPing pings nothing
from anywhere on all protocols. I've tried on all severs in all
directions and from several different workstations. I...
|
by: Ken Allen |
last post by:
I have a number of services developed in C# (.Net), and they have been
working fine for the most part. Recently someone reported that ipon
occassion (originally rarely, but more frequently on some systems of
late), there is an entry in the Event Log immediately after a boot
indicating that the service failed to start after 30,000 milliseconds.
Usually it starts fine when attempting manually after the boot.
I instrumented the code to...
|
by: Zachariah |
last post by:
I created a Windows Service and part of its functionality
is to move a PDF file from a location on the service's
local drive stInPath (C:\PDF\) to a location on another
server stOutPath (\\123.123.123.123\C\PDF\) with this line
of code:
fs.MoveFile(stInPath, stOutPath)
For testing I've been using the same code in a windows
Application form. When I run the Application Form the
|
by: JDF |
last post by:
I am trying to create a Windows service using SimpleXMLRPCServer and
win32serviceutil. The service itself seems to be working properly
(starts, stops, etc) and I can connect using an XMLRPC client from the
localhost. However when I connect from a remote client, I either get a
socket error or an xmlrpclib.ProtocolError error. If I use
serve_forever() rather than handle_request(), the remote clients can
connect but it breaks the Windows...
|
by: schaf |
last post by:
Hi all!
I'm still trying to start/stop a service on a remote computer. (I
promiss that's the last new post because of this problem from my side)
My situation:
I've an application running under the user paul (pw:paul123) on the
computer A in the domain ABC. This application should stop / start a
service, which is running on computer B (in workgroup ABCWG (NOT IN
DOMAIN ABC)). On the computer B I have a user administrator (pw:
adminTest)...
| |
by: Joachim |
last post by:
Which ways are there to make my Windows Service functions accessible remotely
in C#?
|
by: TampaWebDevelopment |
last post by:
I have a Windows service that I have created. That service spins
through the processes, looking to see if a certain application is
running. If it is not, it starts it. The problem that I am having is
that the application is not being started on the console, thus the
user can not interact with it.
So, can I tell the Process.Start method to start it on the console?
Or, do I need to have my service running on the console/interact with
the...
|
by: aj |
last post by:
A few service stop/start/restart questions on SQL Server 2005 SP2, which
I'll call SQLS.
It looks as if there are *potentially* 6 ways to start/stop SQLS
Services like the engine itself, integration services, reporting
service, Agent..
-SQLS Configuration Manager
-SQLS Surface Area Configuration (for Services and Connections)
-Mgmt Studio Local (on server)
|
by: =?Utf-8?B?bGVvMg==?= |
last post by:
Hi All,
I have a question which might be a beginner's question.
I have a webservice whose webmethod has to call a window's service and get
back the results.
What is the best way to implement this scenario.
I am asking this as windows service is an exe and i could not figure out a
way call its methods from webservice.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |