Solved

Command execution

Posted on 2013-01-09
2
196 Views
Last Modified: 2013-01-10
Hi,

I am having the following command which needs to be execute through the .net application

C:\Windows\System32\inetsrv>  appcmd set app "Default Web Site/TestTwo" /applicationPool:"Classic.NetAppPool"


I used the above command as follows

 protected void Button1_Click(object sender, EventArgs e)
        {
         

    string command = string.Format(@"/C C:\Windows\System32\inetsrv> appcmd set app "Default Web Site/TestTwo" /applicationPool:"Classic.NetAppPool");


       ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe");
       cmdsi.Arguments = command;       Process cmd = Process.Start(cmdsi);

}


but it is not working, can you guide what went wrong.
0
Comment
Question by:praveen1981
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 38758832
0
 

Author Closing Comment

by:praveen1981
ID: 38762707
Thanks a lot for your solution
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question