Click here to Skip to main content
15,886,693 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having windows application in that having one button my web server is http://192.168.1.246. when I click the button I want to restart my web server tell me how to write the code for this.
Posted
Updated 14-Sep-11 21:03pm
v2

C#
using System.Diagnostics;

class Program
{
    static void Main()
    {
    //
    // Use Process.Start here.
    //
    Process.Start("iisrestart");
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900