Hi All,
Hope u guys doing great,I am creating a tool to reset IIS . I dono how to RESET IIS in local as well as server(using credentials ) using C#.net code. Can anyone post the code if you have done this already?
Cheers
N
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vipul KelkarRank #1,061 · 1.8K reputationPosted Oct 24, 2011, 5:09 AM EDT
yes this is possible. The System.Diagnostics provides a process class that lets you create new process through code. you can reset IIS as
Process p = new Process();
p.StartInfo = new ProcessStartInfo("iisreset.exe");
p.Start();
this will start resetting the IIS
Vipul KelkarRank #1,061 · 1.8K reputationPosted Oct 24, 2011, 5:14 AM EDT
Win32_Process class will help you acheive this. if you are not familier to WMI you can refer to these articles
http://www.codeproject.com/KB/cs/Remote_Process_using_WMI_.aspx
http://www.c-sharpcorner.com/UploadFile/Vipul.Kelkar/9626/
narasimman g146 reputationPosted Oct 24, 2011, 9:20 AM EDT
Thanks a lot,
I got it ;)
shrikant shrikant4 reputationPosted Nov 3, 2012, 9:24 AM EDT
Will you please provide me the source code to reset the iis remotely....
Thanks
Shri......
narasimman g146 reputationPosted Nov 3, 2012, 9:49 AM EDT
shrikant shrikant4 reputationPosted Nov 3, 2012, 9:48 PM EDT
eagerly waiting for your source code
Thanks a lot for your help.