Solved

Command execution

Posted on 2013-01-09
2
197 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

Industry Leaders: 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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
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.…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

752 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