473,388 Members | 1,405 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,388 software developers and data experts.

restarting IIS from within ASP.NET

I want to restart IIS from within ASP.NET from a WAP enabled phone.
That way if I'm on the beach and the server slows down I can just restart it
manually. I'd also like to be able to programatically kill other executables
on demand (i.e. please dont stop me and tell me that IIS restarts itself).

There is a pskill.exe executable available from sysinternals.com which works
just fine. BUT I cannot get it to run because it doesnt have enough
permissions.

process = new System.Diagnostics.Process();
process.StartInfo.UseShellExecute = true;
process.StartInfo.RedirectStandardOutput = false;
process.StartInfo.FileName = "pskill.exe";
process.StartInfo.Arguments = "consoleappserver.exe";
process.Start();

I want to minimize the security risk of opening security to allow this to
run,
although all code on the server is trusted. NB. I have rights to pskill.exe,
its just
that program that cannot run anything.

The error I get is:

PsKill v1.03 - local and remote process killer Copyright (C) 2000 Mark
Russinovich http://www.sysinternals.com Unable to kill process
consoleappserver.exe: Access is denied.

Note: even if the ASPNET Username has started the consoleappserver.exe
process it
still cannot kill it.

-Simon
Nov 15 '05 #1
0 2583

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

Similar topics

1
by: serge | last post by:
We have an ASP application installed on one powerful Win 2003 and the SQL Server on another Win 2003. We have two copies of the application (identical, one for production and one for test...
0
by: LJ | last post by:
I have been getting this message and can't resolve the problem. I have checked the AntiVirus software and added the application directory to the exculsion list. The application is on a web farm,...
0
by: Simon Weaver | last post by:
I want to restart IIS from within ASP.NET from a WAP enabled phone. That way if I'm on the beach and the server slows down I can just restart it manually. I'd also like to be able to...
3
by: Jerry Boone | last post by:
I have a development unit running XP Pro and I cannot get it to build a web project without restarting IIS. There errors in the task list are.... ! Could not copy temporary files to the output...
4
by: Hari Koduru | last post by:
Hi All, I am getting the following exception in an ASP.NET application. Exception Details: System.InvalidOperationException: Application is restarting. I have been to the following Support...
7
by: Gene | last post by:
I have a Windows Service (VB.NET) that runs 24/7. It queries a Web service 5 to 10 times per hour. About 2 or 3 times a month, it fails. The log indicates that it sends the request to the Web...
4
by: Anony Mous | last post by:
Hi, Is there a function that would allow me to set the local time while the server is running? I can't seem to find anything on this... Thanks, Peter ---------------------------(end of...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... Following the samples online, we implemented a windows service in .Net. Like most services, there's a worker thread actually doing stuff in the background. The problem we've run into is...
1
by: John | last post by:
Hi Is it possible to restart a vb.net winform app form within the same app? I have noticed that sometimes even after app has ended it stays "running" and is still visible in the task manager...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
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...
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...

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.