473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

control windows service



how can i control a windows service through a web page,
for example:
start a service
stop a service

thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
7 1822
Add a service controller control, under the components tab in the "ToolBox".

"Ha ha" <ha**@devdex.com> wrote in message
news:OY**************@TK2MSFTNGP09.phx.gbl...


how can i control a windows service through a web page,
for example:
start a service
stop a service

thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2


when I accesss the web page and start my windows service by clicking a
button,system hint me
System.ComponentModel.Win32Exception:refuse access

what is the reason and what can I do .

thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
The user that the web site is running under (ASP_NET) does not have right
access to start/stop services on this machine.

The issue here is security. You don't want anyone to be able to stop and
start services on a server remotely... If you're confident that only secure
users will access this web site/page, then you can increase accesss rights
(EG. include this user in the power users group).

HTH.

Dan.
"Ha ha" <ha**@devdex.com> wrote in message
news:ej**************@TK2MSFTNGP12.phx.gbl...


when I accesss the web page and start my windows service by clicking a
button,system hint me
System.ComponentModel.Win32Exception:refuse access

what is the reason and what can I do .

thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #4


I access the web page on the server and the user is administrator ,the
result is the same .I was refused.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #5
Hi,

It's still running as the anonymous user, you have to do several things:
1- Put this in the web.config file:
<authentication mode="Windows"/>
<identity impersonate="true"/>

2- Go to the IIS right click on the app name and select properties/
Directory properties and uncheck "anonymous access"

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Ha ha" <ha**@devdex.com> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...


I access the web page on the server and the user is administrator ,the
result is the same .I was refused.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #6


Thank you very much,you help me solved this problem.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #7


sorry for my bothering you again,Do you have any idea to assign a
definite right of controlling a special windows service to the user who
access the web page.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sharon | last post by:
I've had an Access 2000 app running successfully for many months on both Windows XP and Windows 2000. Recently when my Windows 2000 users call a particular report, they get first a dialog...
7
by: Will | last post by:
I'm working on a C# Windows Service that needs to monitor serial port communication. Because the .Net framework does not include support for serial communications, I've decided to use the...
0
by: willow1480 | last post by:
I am developing a small little Service Control Application. I am using a listview control with checkboxes and getting the list of services I want to control from a text file. When you check a...
5
by: andy.g.ward | last post by:
I keep getting this when trying to create an MFC activex control in a c# windows service - anyone got any ideas what the missing module could be??? Exception thrown :...
5
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the...
0
by: kashif kazi via DotNetMonster.com | last post by:
Hi all I developed the simple windows control and place it on ASP.net page, it runs fine. Now i developed the win control as follows which uses web services (Combine logic of two sample...
0
by: MarkD | last post by:
I have an ASP.NET (VB.NET) application that calls all VB6 COM DLL via Interop. The DLL uses functionality contained in a Custom OCX Control (Also VB6) that in turn contains a standard TreeView...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
11
by: Hoku | last post by:
I am using dual monitors on a dual head ATI AGP4x video card. I installed the Nov 11 2005 release of ATI's catalyst control center with Hydravision to manage the dual monitor setup. I recently...
3
by: Francois Stander | last post by:
Hi, Could anyone assist me. I wrote a windows application and is tested successfully. This app must run as a windows service, so I copied the code into a new "windows service project" The problem is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.